Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a date difference column where I compare a date field with todays date , to get a count of months. This is working fine.
But when I filter by zero , if current date month is the same as todays date month , the value in the column is showing as zero. But when there is no data to compare , the value is blank. When I do a filter of a table using a slicer , when I select zero , it also shows the blanks.
date diff code I use is -
Solved! Go to Solution.
Hi @Pandadev ,
It does have a flaw. If it is not important to filter blank values, you could try to disable "Show items with no data". It will filter numbers correctly, but when select blank, the entire table will show blank.
If this still can't help you, I think you might need to waiting for that idea fixed.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Pandadev ,
Date_Last_Contact_Difference is a calculated column and it is shown correctly in the table. But it shows blank not the date which is the same as today's month when you add it to a slicer and select 0. Do I understand correctly?
I create a sample to reproduce it. However, it works fine. I think you might share a dummy file to make us understand clearly. If you can't share it, please share some sample data and more details.
I attached my sample that you could point out the difference between your report.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.
I have the following column measures to get the date difference
Hi @Pandadev ,
I get the message:
This is the default comparison semantics we have in Power BI reports. 0 will match blank. It’s due to legacy from AS equal operator which was used throughout PowerView and at the beginning of PowerBI. The source of the behavior compatibility is in the equality operator described here: https://docs.microsoft.com/en-us/dax/dax-operator-reference. We have not yet added any comparison semantics upgrade in PowerBI.
You can vote for a better behavior to get fixed here: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/33555967-filtering-using-numbers-....
For a workaround, you could change the data type of "Date_Last_Contact_Difference" column from number to text. Then when the column is used as a slicer, it will work fine.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for looking at this for me , yes having it as a text format resolves the issue , but I am now unable to sort them into numerical order Blank,0 ,1,2,3,4,5,6,7,8,9,10,11
It is currently Blank 0,1,11,12,13,14,15,2,20,3,5,7,8,9
Hi @Pandadev ,
It does have a flaw. If it is not important to filter blank values, you could try to disable "Show items with no data". It will filter numbers correctly, but when select blank, the entire table will show blank.
If this still can't help you, I think you might need to waiting for that idea fixed.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Xue .Thanks for taking time out to find a solution for this. This has now resolved my issue
Hi @Pandadev ,
After testing, I think it might be a bug. I have submitted internally. If there is any message, I will post here.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |