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,
I have a pretty large dataset that looks like the one on the left:
I need to filter out where Condition is less than or equal to 5, then group by Group and count the rows after the filter and keep track of the total count in each group without the filter. Then I need to find the filtered count percentage of the unfiltered count by each group. The table and chart on the right are what I'm trying to achieve.
I'm pretty new to Power B.I., any ideas on how I can acheive this?
Thanks!
Solved! Go to Solution.
My first chart in PBI (I don't know how to change scale and colors) but I hope it is useful for your purpose
per scaricarli, fai click sul seguente link e segui le istruzioni.
Hi @pluto556 ,
If you want to implement it with DAX, please try like this:
All of the formulas are measures:
Counts of Qty after filter = CALCULATE(SUM('Table'[Qty]),'Table'[Condition]<=5)
Total counts = COUNTROWS('Table')
Pct = DIVIDE([Counts of Qty after filter],[Total counts])
Hi @pluto556 ,
If you want to implement it with DAX, please try like this:
All of the formulas are measures:
Counts of Qty after filter = CALCULATE(SUM('Table'[Qty]),'Table'[Condition]<=5)
Total counts = COUNTROWS('Table')
Pct = DIVIDE([Counts of Qty after filter],[Total counts])
My first chart in PBI (I don't know how to change scale and colors) but I hope it is useful for your purpose
per scaricarli, fai click sul seguente link e segui le istruzioni.
@pluto556 - Well to ignore stuff, use ALL or ALLEXCEPT. So maybe something like:
Measure =
VAR __Count = COUNTROWS('Table')
VAR __CountAll = COUNTROWS(ALL('Table'))
RETURN
DIVIDE(__Count,__CountAll)
Also, don't forget about Show value as, Percent of Grand Total. Handy.
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.