Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, this may be a simple issue but I'm unable to figure it out.
I have a table-
I have made it by using the percent of column total because I need to see the percent of the each result per month. The values do not change when I use the date slicer. But it does change to 100% when I have the Last result PGS slicer- since I click it, that is the total column assuming that's why it shows up as 100%. How do I still use the slicer but keep these orginal numbers?
Solved! Go to Solution.
@powerbi56 , Assuming you are using a date table for month and year, you can have measure like
divide([Measure], calculate([measure], filter(all(Date), Date[Year] = max(Date[Year]) && Date[Month] = max(Date[Month]) )) )
or
divide([Measure], calculate([measure], removefilters(Table[Last result PGS]) ) )
Thanks for the reply from @amitchandak , please allow me to provide another insight:
Hi @powerbi56 ,
You can use the measure+all() function instead:
All(): returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.
Refer to:
ALL function (DAX) - DAX | Microsoft Learn
Measure =
var _sum=
SUMX(
FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])),[Value])
return
DIVIDE(
SUM('Table'[Value]),_sum)
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from @amitchandak , please allow me to provide another insight:
Hi @powerbi56 ,
You can use the measure+all() function instead:
All(): returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.
Refer to:
ALL function (DAX) - DAX | Microsoft Learn
Measure =
var _sum=
SUMX(
FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])),[Value])
return
DIVIDE(
SUM('Table'[Value]),_sum)
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@powerbi56 , Assuming you are using a date table for month and year, you can have measure like
divide([Measure], calculate([measure], filter(all(Date), Date[Year] = max(Date[Year]) && Date[Month] = max(Date[Month]) )) )
or
divide([Measure], calculate([measure], removefilters(Table[Last result PGS]) ) )
User | Count |
---|---|
96 | |
85 | |
77 | |
66 | |
63 |
User | Count |
---|---|
110 | |
96 | |
96 | |
67 | |
59 |