Forum Discussion
Map Visual & Displaying YoY Changes in Moving Averages
Hi,Dave1mo1
Thank you for your reply, and I'm sorry to say that the advice provided earlier didn't work very well.
In fact, as you said, the problem is in the data source itself: the DAX code is calculating null results because some continents don't have the previous day's data. This is not due to a programming error in the measure or calculate column you created, so it is tricky to work with data that is not available directly from power BI.
I recommend that you use the IF function or the switch function to set the result of an empty calculation to a default value such as -999 or some other unlikely (and highly visible) result for cases where there is no actual data from the previous day.
For the matrix or table in the system automatically aggregated Total value, you can use the ISINCOPE function to artificially modify the final Total calculation results.
like this:
Using IF with the ISINCOPE function
This will not affect your original calculation.
You can then individually set up measures with special default values in Map visual, e.g. if the measure has a special value of -999, it will be marked by displaying the area in a specific color.
The absence of data in the data source itself is tricky for trying to modify the expected results directly in power BI dektop, as it is a problem with the data itself and not with the code written
Looking forward to your reply!
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I know this is a delayed response - my apologies. I ended up creating a dimensional table that includes each of the regions, a column with yesterday's date, and a key for each of the dimensions that the map can be filtered on. It was kind of a backwards way to do it, but seems to be working in my testing.
Thanks again for the help.