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 guys,
I'm just learning the magic of PowerBi by building a weekly report.
However, I got stuck and I really hope you guys can point me in the right direction.
Simply put, my table has a column with created apps, and I want to visalize the distinct apps within a chosen period of time.
I have a measure for this:
Solved! Go to Solution.
Hi @Anonymous ,
It is caused that the value is filtered by the slicer (Week = 27). You could try the following formula with the function of ALL. And you need to redefine the selected value in the measure.Because the measure of Previous Week to Selected Week is still affected by the slicer.
Last Week Distinct Apps = var a = SELECTEDVALUE(AllData[WeekNumber]) return CALCULATE(DISTINCTCOUNT(AllData[AppId]), FILTER(ALL(AllData), AllData[WeekNumber] = a-1))
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 @Anonymous ,
It is caused that the value is filtered by the slicer (Week = 27). You could try the following formula with the function of ALL. And you need to redefine the selected value in the measure.Because the measure of Previous Week to Selected Week is still affected by the slicer.
Last Week Distinct Apps = var a = SELECTEDVALUE(AllData[WeekNumber]) return CALCULATE(DISTINCTCOUNT(AllData[AppId]), FILTER(ALL(AllData), AllData[WeekNumber] = a-1))
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.
Hello @v-xuding-msft and thank you millions for your interest and reply!
You are magnificent, you helped me a lot!
I was able to solve my issue by following your formulas and adding yet another filter.
What I forgot to mention was that I had a global filter by the [Origin] of the app.
Therefore, using ALL function ignored this filter and returned the total unique values of last week.
This [Origin] column was in another table, so I related my AllData table with that column:
AllData[Origin] = RELATED(Application[Origin])
I figured I can add a second filter to the calculate function to keep that filter running.
And TA-DAAA, it gave me the previous week unique values filtered by origin :), like below:
Last Week Distinct Apps = var a = SELECTEDVALUE(AllData[WeekNumber]) return CALCULATE(DISTINCTCOUNT(AllData[AppId]), FILTER(ALL(AllData), AllData[WeekNumber] = a-1), FILTER(ALL(AllData), AllData[Origin] = "origin1")
Without your explanation, I would have been stuck forever!
So thank you so so so much!
Have great day,
Daniela
How to handle end of year where week 52 becomes week 1
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 |
---|---|
113 | |
99 | |
76 | |
73 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |