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.
Hi,
iam looking for a solution for the following problem:
The dashboard user can select a time periode over a data filter visualisation.
I have the following data set:
Now I will integrate a KPI indicator for the column "reach" in comparison with the time period before.
1st example:
User selection: 24.06.2017
Total reach: 189
Time period before: 23.06.2017
Total reach: 1062
- 82,21%
2nd. example:
User selection: 23.06.2017 - 24.06.2017
Total Reach = 1.251
Time period before: 21.06.2017 - 22.06.0217
Total reach = 1.495
- 16,33%
Iam using PowerBi Desktop v2.47.4766.801. Is this possible with a new measure and dax function?
Thanks a lot
Solved! Go to Solution.
Here is a little example
Basically I created two measures
reach within the selection
reachSelection = var minDateSelection = MINX(ALLSELECTED('reach'[date]),'reach'[date]) var maxDateSelection = MAXX(ALLSELECTED('reach'[date]),'reach'[date]) return CALCULATE(SUM(reach[reach]), FILTER(ALL(reach[date]), 'reach'[date] >= minDateSelection && 'reach'[date] <= maxDateSelection ) )
reach < min(selection)
reachBeforeSelection = var minDateSelection = MINX(ALLSELECTED('reach'[date]),'reach'[date]) return CALCULATE(SUM(reach[reach]), FILTER(ALL(reach[date]), 'reach'[date] < minDateSelection ) )
Finally a division a little percent consideration
aKPI = (Divide([reachSelection],[reachBeforeSelection])-1)*100
The second example looks like this
But I have to admit that I have a different result for the first exmple ...
Hey,
try this measure 🙂
try this = var minDateSelection = MINX('statistics','statistics'[Date]) var numberOfDatesInSelection = DISTINCTCOUNT('reach'[date]) return calculate( SUM(reach[reach]), topn(numberOfDatesInSelection, FILTER(ALL(statistics), 'statistics'[Date] < minDateSelection ), 'statistics'[Date], DESC ) )
My previous solution did not use the last days (noofdays), now i determine these days and then i'm filtering the the reach table, guess it's fixed now (hopefully)
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 |
---|---|
105 | |
97 | |
80 | |
67 | |
63 |
User | Count |
---|---|
146 | |
110 | |
107 | |
86 | |
63 |