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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Juan_AL
Frequent Visitor

Hellp with DAX multiple measures

Good Morning,
i have a table that includes size information and need to do a basic measure, calculate the percentage per size,

what i ended up doing is pretty amateur, creating a custom column where i sum al size column and then i created individual measures per size dividin the size and the sum

this is how i have the size columns

Juan_AL_0-1693499963599.png

 

the individual dax looks like this

125 =
IF(
    SUM(QCTable[Size Sum]) <> 0,
    CALCULATE(SUM(QCTable[Sizes.125_b]) / SUM(QCTable[Size Sum])),
    0
)
 
and my visiual like this
Juan_AL_1-1693500092787.png

 

is there a better way to do this? i was trying to have them with seperate size table but since these are columns i cant think of another way

thanks

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Juan_AL there is an easy and scalable way:

 

- transform data
- select all columns except size columns 
- right-click, unpivot other columns it will add two columns, attribute, and value, rename these as per your requirement
- close and apply

Write your measure, just one, and you can filter it by any attribute (which is size) you can also view it in pivot form in matrix visual by adding attribute column on columns.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
parry2k
Super User
Super User

@Juan_AL there is an easy and scalable way:

 

- transform data
- select all columns except size columns 
- right-click, unpivot other columns it will add two columns, attribute, and value, rename these as per your requirement
- close and apply

Write your measure, just one, and you can filter it by any attribute (which is size) you can also view it in pivot form in matrix visual by adding attribute column on columns.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

AWESOME THIS WORKED!!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors