image

How to DISTINCTCOUNT with FILTERS and ALL

Questions: I needed to do a running DISTINCTCOUNT of of the number of customers (Source No_) from a transaction table (Value Entry) with 2 FILTERS (Document Type = 2 && Sales > 0) That was fairly easy as below; Active Customers = calculate(DISTINCTCOUNT(‘TABLE$Value Entry'[Source No_]), FILTER(T_Date, T_Date[Date] <= max(T_Date[Date])), FILTER(‘TABLE$Value Entry’,and(‘TABLE$Value Entry'[Document Type]=2, ‘TABLE$Value Entry'[Sales Amount Read More

image

How to Use DATEADD to Generate Comparisons Over a Range of Different Time Frames

DATEADD is a flexible and powerful DAX function. DATEADD takes in a date column, the offset, and the time interval for the offest. The offset is the number of intervals to go forward or back in time. Example Formulas: Rev Previous_Day = CALCULATE(SUM(TransactionData[Revenue]),DATEADD(CalenderDate[Date],-1,DAY) Rev Previous_Month = CALCULATE(SUM(TransactionData[Revenue]),DATEADD(CalenderDate[Date],-1,MONTH)) Rev Previous_Quarter = CALCULATE(SUM(TransactionData[Revenue]),DATEADD(CalenderDate[Date],-1,QUARTER) Rev Previous_Year = CALCULATE(SUM(TransactionData[Revenue]),DATEADD(CalenderDate[Date],-1,YEAR))

image

How to Fix “Data type errors” in Power BI

Sometimes, when you import data into Power BI, the columns appear blank. This situation happens because of an error in interpreting the data type in Power BI. The resolution to this error is unique to the data source. For instance, if you are importing data from SQL Server and see blank columns, you could try Read More

image

How to Create a User with Access to a Specific Database Only in Azure SQL

In this exercise, you’ll create logins, users, and admins, and you’ll grant Azure Active Directory (Azure AD) users access to the database, as you would for normal users in SQL Server. Open SQL Server Management Studio (SSMS), and connect to your Azure SQL Database server, if you aren’t already connected. After you’ve configured and connected Read More

image

How to Sync Slicers on Different Pages

Suppose you want your report readers to be able to look at overall sales metrics, but also highlight performance for individual district managers and different time frames. You could create separate reports or comparative charts. You could add filters in the Filters pane. Or you could use slicers. Slicers are another way of filtering. They narrow Read More