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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AH2022
Helper II
Helper II

calculations (column) on top of existing DAX measures (rows)

Hi ALL,

 

I need to produce a report, which requires measures as rows and measures on columns.

I read about calculations groups, and usually they are about changing measures (on rows) depending on different frame times (on columns).

 

The requirements for this report do not just change the measures on the line based on time, but also other criteria.

 

For example, on rows we group different types of gifts by rows: gifts from different campaigns, gifts from different events, gifts from stock and others.

 

In the columns, we need to “modify” the measures on rows by status of gifts:  RECEIVED (paid), EXPECTED – signed (an agreement is signed and the gift is expected), or just opportunities that do not have a contract yet (Opportunities NOT SIGNED). Here is an example below:

AH2022_0-1666793800862.png

On this visual, the rows contain for example,  gifts from CampaignA and CampaignB

AH2022_1-1666793875479.png

And the columns, don’t represent a dimension of just one table (for example fiscal years). It can be GIFT from CampaignA&B, Expected or GIFT FROM A&B, Received And I have the measure for the [GiftExpected] [GIftReceived] etc

AH2022_2-1666793904755.png

I need some advice on how to produce this table. Is it possible to have measures for rows and measures for columns? I have never done this before.

 

Any help would be much appreciated.

Thank you

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @AH2022 ,

Do you want to put Measure on the matrix, but in the matrix column and row can only add calculated column, Measure can only be added to Value.

It can only be said that you can use the name of the measure to use Enter data to recreate the two tables.

vyangliumsft_0-1666854674120.png

vyangliumsft_1-1666854674122.png

 

Use Switch to customize the rules, when the rules are met, it is equal to the corresponding Measure.

Measure =
SWITCH(
    TRUE(),
    MAX('matrix1'[Label])="GiftCampalgn"&&MAX('martix2'[Group])="Received 22-23",[Measure1],
    MAX('matrix1'[Label])="GiftFromEvents"&&MAX('martix2'[Group])="Received 22-23",[Measure2],
    MAX('matrix1'[Label])="GiftfromStocks+Other"&&MAX('martix2'[Group])="Received 22-23",3,
    MAX('matrix1'[Label])="GiftCampalgn"&&MAX('martix2'[Group])="Expacted 22-23",11,
    MAX('matrix1'[Label])="GiftFromEvents"&&MAX('martix2'[Group])="Expacted 22-23",22,
    MAX('matrix1'[Label])="GiftfromStocks+Other"&&MAX('martix2'[Group])="Expacted 22-23",33,   
    MAX('matrix1'[Label])="GiftCampalgn"&&MAX('martix2'[Group])="Opportunities 22-23",111,
    MAX('matrix1'[Label])="GiftFromEvents"&&MAX('martix2'[Group])="Opportunities 22-23",222,
    MAX('matrix1'[Label])="GiftfromStocks+Other"&&MAX('martix2'[Group])="Opportunities 22-23",333,
    MAX('matrix1'[Label])="GiftCampalgn"&&MAX('martix2'[Group])="Total 22-23",1111,
    MAX('matrix1'[Label])="GiftFromEvents"&&MAX('martix2'[Group])="Total 22-23",2222,
    MAX('matrix1'[Label])="GiftfromStocks+Other"&&MAX('martix2'[Group])="Total 22-23",3333
    )

vyangliumsft_2-1666854674127.png

 

 

Best Regards,

Liu Yang

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @AH2022 ,

Do you want to put Measure on the matrix, but in the matrix column and row can only add calculated column, Measure can only be added to Value.

It can only be said that you can use the name of the measure to use Enter data to recreate the two tables.

vyangliumsft_0-1666854674120.png

vyangliumsft_1-1666854674122.png

 

Use Switch to customize the rules, when the rules are met, it is equal to the corresponding Measure.

Measure =
SWITCH(
    TRUE(),
    MAX('matrix1'[Label])="GiftCampalgn"&&MAX('martix2'[Group])="Received 22-23",[Measure1],
    MAX('matrix1'[Label])="GiftFromEvents"&&MAX('martix2'[Group])="Received 22-23",[Measure2],
    MAX('matrix1'[Label])="GiftfromStocks+Other"&&MAX('martix2'[Group])="Received 22-23",3,
    MAX('matrix1'[Label])="GiftCampalgn"&&MAX('martix2'[Group])="Expacted 22-23",11,
    MAX('matrix1'[Label])="GiftFromEvents"&&MAX('martix2'[Group])="Expacted 22-23",22,
    MAX('matrix1'[Label])="GiftfromStocks+Other"&&MAX('martix2'[Group])="Expacted 22-23",33,   
    MAX('matrix1'[Label])="GiftCampalgn"&&MAX('martix2'[Group])="Opportunities 22-23",111,
    MAX('matrix1'[Label])="GiftFromEvents"&&MAX('martix2'[Group])="Opportunities 22-23",222,
    MAX('matrix1'[Label])="GiftfromStocks+Other"&&MAX('martix2'[Group])="Opportunities 22-23",333,
    MAX('matrix1'[Label])="GiftCampalgn"&&MAX('martix2'[Group])="Total 22-23",1111,
    MAX('matrix1'[Label])="GiftFromEvents"&&MAX('martix2'[Group])="Total 22-23",2222,
    MAX('matrix1'[Label])="GiftfromStocks+Other"&&MAX('martix2'[Group])="Total 22-23",3333
    )

vyangliumsft_2-1666854674127.png

 

 

Best Regards,

Liu Yang

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

Thank you so much for your answer @Anonymous 

I will take time to test it this week-end.

I will accept as solution after practice. Thanks again. Much appreciated.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.