Forum Discussion
Anonymous
7 years agoNot applicable
DAX - Filtering not working
I have a dax formula that looks at the previous year's data of difference values. I have a slicer which I can choose between Units and Sales. LastYearKPI = if([Attribute Filtered],
SWITC...
- 7 years ago
Anonymous,
It seems that you'll need to add <value>.
https://www.sqlbi.com/articles/filter-arguments-in-calculate/
AlB
7 years agoCommunity Champion
Hi Anonymous
1. Can you explain what you are trying to do for the "Sales" option in the SWITCH?
2. What exactly are you trying to do with
FILTER ( PivotedData, PivotedData[Attribute Value])
3. Can you show your data model or share the pbix? Otherwise it's kinda hard to guess what might be going on
Anonymous
7 years agoNot applicable
I have two columns, units and sales. I have a slicer which means I can switch between the two as the values for a table. I then have a table where I want to compare the year on year variance for either sales or units. My year and week format is 'yyyy-dd' hence not a date format. I then want to be able to filter it by PivotedData[Attribute Value] but I cannot. In the "Sales" part of the DAX I have wrapped the expression in a CALCULATE(...FILTER(PivotedData,PivotedData[Attribute Value]) but it makes no difference. It just gives the total.