Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
For context, I'm still fairly new to DAX. In a table visual, I have a list of dates and I am trying to see if those dates match any dates in a holiday dates table. And I want to do so based on the country selected in a slicer. I was able to filter the holiday dates table down to the selected country and then based on the date on the table visual, it shows "same" if the date is on the Holiday dates table and "diff" if it isn't on the holiday dates table:
Solved! Go to Solution.
Delete this relationship:
In addition, you can abbreviate the formula to this:
Working Measure =
IF(SELECTEDVALUE( zDates[Date])in VALUES('zHoliday Calendar'[List of Dates]), "holiday", "regular")
Delete this relationship:
In addition, you can abbreviate the formula to this:
Working Measure =
IF(SELECTEDVALUE( zDates[Date])in VALUES('zHoliday Calendar'[List of Dates]), "holiday", "regular")
Thanks! The shorter formula worked for the working measure. What did you do for the not working measure? I'm not sure how to get it to look at 2 days prior.
Please refer:
Not Working Measure =
IF(SELECTEDVALUE( zDates[Date])-2 in VALUES('zHoliday Calendar'[List of Dates]), "holiday", "regular")
Wonderful, thank you for your help!
Thanks but I'd still need to recreate your data and tables etc. You can use OneDrive, Dropbox or Google Drive to upload your PBIX and then link to it.
Regards
Phil
Proud to be a Super User!
Hi @PhilipTreacy,
Thanks for the suggestions. That was helpful. The file of the mock up of the data can be found here: https://drive.google.com/file/d/1IVz5bwacT6d8Tl_LABeGxeIu4ffVuzOp/view?usp=sharing
Kind regards,
Rebekah
Can you please supply your PBIX file so I can see your data.
regards
Phil
Proud to be a Super User!
Hi @PhilipTreacy , I couldn't figure out how to attached a PBIX file, but here are some screen shots of the table visual and the model.
PBIX file.
User | Count |
---|---|
127 | |
108 | |
99 | |
63 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |