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

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.

Reply
jrivera43
Frequent Visitor

Multi-row Aggregations in DAX

Does anyone know how to create multi-row aggregations like this in DAX? I need to get a subcategory under the main category like the image below. I need to create a virtual table first to create a measure from. Any help would be appreciated.

 

jrivera43_0-1621124516994.png

 

 

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi, @jrivera43 

I do not know well how your data model looks like. But I tried to create the below sample pbix file based on the explanation.

I suggest having dim table like below.

please check the below picture and the sample pbix file's link down below.

All measures are in the sample pbix file.

 

Picture2.png

 

https://www.dropbox.com/s/pkq9eo4oral5wei/jrivera.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thanks Jiwan,

 

Can you show me what the DAX would look like to create a virtual table using the same structure as the ones shown?

 

 

 

Hi, @jrivera43 

Thank you for your feedback.

Sorry that I quite do not understand your question.

Do you want to write an incomplete measure? And may I ask what is it for?

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


I would like to create a flag measure. The flag measure needs to show whether the calculation is over or under a certain amount. Using something similar to the example:

jrivera43_2-1621254155701.png

 

 

 

Ultimately I want to get to this:

 

jrivera43_3-1621254267179.png

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors