Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi
I am struggling with the following problem. I have a fact table in which I already receive calculated values per category and subcategory in one table. The totals per category and subcategory do not and should not be equal.
Let's assume we have category A, which is divided into 3 subcategories: AA, AB, AC. The entire category A is supposed to have a subtotal of 370, and the subcategory AA is 50, AB 100 and AC 200. The sum of the subcategories is 350, but I would not like to see 350, but 370.
I already receive the calculated data from the backend layer:
Since I have one column with values that simultaneously contains the sum of the entire category and the subcategory values, the whole thing is duplicated in the sums. How can I approach this differently?
This is an example, the real case has a category and a tree with 8 levels of subcategories, so it is very important for me that the solution is calculated correctly.
Hi @Asmoday1507 ,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi @Asmoday1507
your table is already structured as a matrix. Just put it in a table visual and will display as a matrix.
Hi,
You can use ISINSCOPE to change the calculation logic depeding on the level of the visualization. E.g.
This will give the sum of subcategory A in total level an in the subcategory level the values are shown as normal.
Proud to be a Super User!
Yes, Isinscope dax function is useful, but I don't want to see value from A in my table, value for A is only calculated subtotal in backend.
Also it's only an example, real scenario has a tree with 8 subcategories, 8 subsubcategories etc
HI @Asmoday1507,
Did you mean to calculate with category fields but not really use this in the visual axis?
If that is the case, you may need to add variable in measure to restore the current category group and calculate correspond result.
All the secrets of SUMMARIZE - SQLBI
Then you can lookup above variable table and filter records based on current row contexts.
Regards,
Xiaoxin Sheng
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
14 | |
11 | |
10 | |
8 |
User | Count |
---|---|
24 | |
15 | |
15 | |
14 | |
13 |