image

How to Use HASONEVALUE to Remove Unexpected Sum

Review the table visual, noticing the total for the Target column. Summing the target values together doesn’t make sense because salespeople targets are set for each salesperson based on their sales region assignment(s). A target value should only be shown when a single salesperson is filtered. You will implement a measure now to do just that. Rename Read More

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 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