Forum Discussion
Filtering based on parent grouping
Hi v-yueyunzh-msft ,
It was actually a problem with my slicers that I have fixed. I am still having a problem however. When multiple selections are present on the slicers the totals are cumulative instead of being per group.
Do you have any ideas how to correct this?
Thanks for your help!
Hi , ruiner
If you want the "total" show right, you can create a new measure based on the before, like this:
Measure 2 = var _t = ADDCOLUMNS(SUMMARIZE(ALLSELECTED('Query1'),'Query1'[CompanyId],'Query1'[FiscalPeriodId],'Query1'[EmployeeStatusId]),"measure",[Measure])
return
IF(HASONEVALUE('Query1'[EmployeeStatusId]),[Measure],SUMX(_t,[measure]))
Then you can test in the visual :
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- ruiner3 years agoFrequent Visitor
Thanks again v-yueyunzh-msft. That wasn't the problem I was looking at yet but that did fix that issue.
What is happening is when the slicer is set to fiscal year 2021 the correct totals show
And when set to 2020 the correct totals are also shown
The problem is when both 2020 and 2021 are selected at the same time
The same thing happens when multiple values are selected for other slicers, such as the company slicer.
- v-yueyunzh-msft3 years agoCommunity Support
Hi , ruiner
It seems the [Measure 2] returns the 11+15 and 26+29 , can you check the summarize() function contains the all columns in your table?
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- ruiner3 years agoFrequent Visitor
Hi v-yueyunzh-msft,
The original measure also returns the same incorrect numbers when multiple slicer values are selected.