Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
NewBe1
Frequent Visitor

Create a subcategory using column data and rename the category

Hi All,

 

I'm new to Power BI and I've been trying to replicate some stuff from excel to power bi. I am having trouble putting a category label on the matrix and then the subcategories.

This is what I'm trying to achieve:

NewBe1_0-1691116253680.png

and this is my sample BI report:

NewBe1_0-1691116484063.png

Help would be appreciated!

Thank you

7 REPLIES 7
Ritaf1983
Super User
Super User

Hi @NewBe1 ,
This happening because the relationship between your tables is inactive , so there is no filter context:

Ritaf1983_0-1691190860377.png

To solve it you can create a Dax measure using the function "userelationship" :

sum account ammount = CALCULATE(sum('GENERALENTRY'[ACCOUNTINGAMOUNT]),USERELATIONSHIP('Mainaccount'[LEDGERDIMENSIONID],GENERALENTRY[LEDGERDIMENSION]))
Ritaf1983_1-1691191007597.png

Link to your file with my measure 

 

Please Note: This model seems inefficient, and you may encounter additional problems in the other calculations.
Consider taking a moment to go through the following documents:

https://blog.enterprisedna.co/data-modelling-in-power-bi-tips-best-practices/

(include video)

https://www.datacamp.com/tutorial/data-modeling-in-power-bi-tutorial?utm_source=google&utm_medium=pa...

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Getting incorrect total amount

Getting incorrect total amount

Ritaf1983
Super User
Super User

Hi @NewBe1 
It works like a pivot table.
If you have all your data rows it means you have some unsummarised  columns like :

Ritaf1983_1-1691118294071.png

if your value is summarized it should look like this :

Ritaf1983_2-1691118430812.png

or this with some value :

Ritaf1983_3-1691118476968.png

I worked with data from your attached picture, if it is still not resolving your problem please attach your example in a more practical way.

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

NewBe1_0-1691128646820.png

I found the solution, but now my Actuals total showing same number, it should show values as per categories

@NewBe1 

It seems relationship problem.

Please share some sample as i mentioned in my  first responce

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.