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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
eunji888888
Frequent Visitor

How to show every rows with using different measures

I am going to optimize a excel report by using Power BI. For the Amount columns, i do not have the idea how to create measure/column because depending on different activity, brand or channel, it will have different calculation for the amount. How should i deal with this kind of problem?

 

My expected goal is to create a table with this format: 

 Type  Activity  Channel BrandAmount
Type ABrand A regular discountChannel ABrand A12345
Type BBrand A additional discountChannel ABrand A23456

Type C

Brand A displayChannel ABrand A34567
2 ACCEPTED SOLUTIONS
Kishore_KVN
Super User
Super User

Hello @eunji888888

You can use nested IF or SWITCH function or filter using CALCULATE. I can help you with SWITCH function as an example:

SWITCH(TRUE(),
'Table'[Activity] = "Brand A regular discount" && 'Table'[Channel] = "Channel A" && 'Table'[Brand] = "Brand",write your first measure here,
'Table'[Activity] = "Brand A additional discount" && 'Table'[Channel] = "Channel A" && 'Table'[Brand] = "Brand",write your second measure here,
.
.
.
.
Blank())

 

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

View solution in original post

Anonymous
Not applicable

Hi,@eunji888888.I  am glad to help you.
Hello,@Kishore_KVN, thanks for your concern about this issue.Your answer is excellent!And I would like to share some additional solutions below.
Have your needs been solved?
Here are some practical examples to add to the suggestions I made to @Kishore_KVN.
Here are the similar cases: I hope you find them helpful!
Discussing and executing corresponding MEASURES by categorizing different brands of products is a very good way to solve your needs.
In the table or matrix can achieve this effect, I hope the following examples can give you a good inspiration

M_result = 

SWITCH(TRUE(),
    SELECTEDVALUE(Header[category])="Material",
        SWITCH(TRUE(),
            SELECTEDVALUE(Header[name])="Wood",[M_1],
            SELECTEDVALUE(Header[name])="Particle Board",[M_1],
            SELECTEDVALUE(Header[name])="Iron",[M_1]
        ),
    SELECTEDVALUE(Header[category])="Others",
        SWITCH(TRUE(),
            SELECTEDVALUE(Header[name])="%Good",[M_%Good],
            SELECTEDVALUE(Header[name])="%Not Good",[M_%Not_Good]
        )
)

vjtianmsft_0-1718962797331.png

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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,@eunji888888.I  am glad to help you.
Hello,@Kishore_KVN, thanks for your concern about this issue.Your answer is excellent!And I would like to share some additional solutions below.
Have your needs been solved?
Here are some practical examples to add to the suggestions I made to @Kishore_KVN.
Here are the similar cases: I hope you find them helpful!
Discussing and executing corresponding MEASURES by categorizing different brands of products is a very good way to solve your needs.
In the table or matrix can achieve this effect, I hope the following examples can give you a good inspiration

M_result = 

SWITCH(TRUE(),
    SELECTEDVALUE(Header[category])="Material",
        SWITCH(TRUE(),
            SELECTEDVALUE(Header[name])="Wood",[M_1],
            SELECTEDVALUE(Header[name])="Particle Board",[M_1],
            SELECTEDVALUE(Header[name])="Iron",[M_1]
        ),
    SELECTEDVALUE(Header[category])="Others",
        SWITCH(TRUE(),
            SELECTEDVALUE(Header[name])="%Good",[M_%Good],
            SELECTEDVALUE(Header[name])="%Not Good",[M_%Not_Good]
        )
)

vjtianmsft_0-1718962797331.png

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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

 

Kishore_KVN
Super User
Super User

Hello @eunji888888

You can use nested IF or SWITCH function or filter using CALCULATE. I can help you with SWITCH function as an example:

SWITCH(TRUE(),
'Table'[Activity] = "Brand A regular discount" && 'Table'[Channel] = "Channel A" && 'Table'[Brand] = "Brand",write your first measure here,
'Table'[Activity] = "Brand A additional discount" && 'Table'[Channel] = "Channel A" && 'Table'[Brand] = "Brand",write your second measure here,
.
.
.
.
Blank())

 

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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