Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I've a slicer based on a date column (STOCK_START_DATE) and I'm trying to pick up the upper bound of this slicer set by the user, in a dynamic fashion (if the user changes the upper bound this would be "sensed"). After picking up the value of the upper bound I need to compare it to the current the date, and if it is less than the current date I have to "trigger" another filter to filter out the record based on another column (I need to trigger the filter "STOCK_TYPE <> 'Coming').
Is this possible to do? If yes, can you explain me how, please?
Thank you very much!
hi @AMS_Pag
You could use IF Function to create a conditional measure.
For example:
IF(MAX(STOCK_START_DATE) >Currentdate, <expression>,CALCULATE(<expression> FILTER(Table,"STOCK_TYPE <> 'Coming')))
If you still have problem, please share your sample data and your expected output.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Regards,
Lin
Hi @v-lili6-msft,
thank you very much for your response.
I've created this measure:
hi @AMS_Pag
You may use measure like below:
COMING_FILTER = IF(MAX(FT_STOCK_VIEW[STOCK_START_DATE]) < TODAY(), COUNTROWS(FILTER(FT_STOCK_VIEW, FT_STOCK_VIEW[STOCK_STOCK_TYPE] <> "Coming")), BLANK())
And measure could not be set in page filters box and it could only be drag into visual filters box and it is not blank.
If you still have problem ,please share a simple sample pbix file and your expected output.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Regards,
Lin
User | Count |
---|---|
103 | |
90 | |
78 | |
72 | |
68 |
User | Count |
---|---|
108 | |
96 | |
95 | |
74 | |
71 |