Forum Discussion

m_e_1203's avatar
m_e_1203
Icon for Helper II rankHelper II
5 years ago
Solved

Using a measure as a slicer

Hello,

 

I am trying to do like this post but I could not figure out how to do and need you help.

https://community.powerbi.com/t5/Desktop/Use-Measure-as-Slicer/m-p/1032054#M485879

 
***CY = Current Year / LY = Last Year***  (Fiscal year = Apr - Mar)
Qty CY = CALCULATE([Total Qty], FILTER('Date', 'Date'[Date] >= DATE(2020,4,1) && 'Date'[Date] <= DATE(2021,3,31)))
Qty LY = CALCULATE([Total Qty] , DATEADD('Date'[Date], -1, YEAR))
Qty Difference = [Qty CY] - [Qty LY]

 

I created Sales Quantity Measure like this;

Qty Segment =
IF(ISBLANK([Qty CY]), "No Purchase in 2020",
IF([Qty Difference] < 0.00, "Decrease",
IF([Qty Difference] = 0.00, "Same",
"Increase")))
 
I want to use this text measure as slicer but do not want to create Calculated Column because it did not adjust when I use Month filter. (I could only compare by annual Qty)
 
"Customer Segment" table is created like the thred above. 
How can I connect this to a measure "Qty Segment", so that I can use as a slicer?
 
Thank you for your assitance.

 

8 Replies