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.
The measure that is being displayed in the KPI is a monthly average of several of the DISTINCTCOUNT measures displayed on the right. If it can't find any occurrences it returns (Blank), resulting in the KPI picture at the top.
I know this is a common problem and that people solve it by either doing the following:
[Measure] + 0
or
IF(ISBLANK([Measure]),0,[Measure])
I've tried both of these solutions. This works for 0 values, but for some reason, they change my measure to 0 always, even if there are values to be counted.
See this example below:
Before change:
After change:
This is the measure in question, the change is highlighted in bold at the end of the code:
Active Internal Users = CALCULATE(DISTINCTCOUNT(PlatformEvents[UserId]), PlatformEvents[CountEvents] > 0) + 0
The average in the KPI is calculated as follows:
Average Active Internal Users Last Month = ([Active Internal Users] + CALCULATE([Active Internal Users],DATEADD(TimeDimension[Date],-7,,DAY)) + CALCULATE([Active Internal Users],DATEADD(TimeDimension[Date],-14,,DAY)) + CALCULATE([Active Internal Users],DATEADD(TimeDimension[Date],-21,,DAY)))/4
Note the extra commas (,,) after numbers in the above DAX code. For some reason whenever I add numbers I need to add an extra comma otherwise it doesn't see it as a proper comma for the next argument. This might have something to do with my problem?
I was wondering if anyone ever had this problem before? It's quite frustrating and could easily be solved if I had the option in this idea thread.
Any help would be appreciated!
Hi.
It is because, in addition to not wanting empty, the KPI visual works ONLY on the CUMULATED measures!
I spent the whole day to figure it out.
Hope it helps.
Great thanks, very interested to find out what the cause of this is!
Yes here is some sample data with the (Blank) occurrence (the app example in my OP):
Here is sample data without the (Blank) occurrences (the user example in my OP), but that can be used to test 0 problem once you add +0 to the formula:
They're .csv files. If you would prefer something else let me know!
OK, I have the files, CSV's are good. I'll take a look at it.
Can you share some made-up or sample data? I'd like to experiment with this.
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |