Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi!
I have unpivoted table like:
Product | Measure | Unit | Value |
Product 1 | Price | USD | 1000 |
Product 1 | Remains | tn | 10 |
Product 1 | Competitor Price | USD | 1050 |
Product 2 | Price | USD | 1060 |
Product 2 | Remains | tn | 15 |
Product 2 | Competitor Price | USD | 1100 |
Product 3 | Price | USD | 1060 |
... | ... | ... | ... |
So, I use matrix for visualize this info. I can't use pivot table because of more then 50 measures.
But in grandtotals I need to calculate the sum for tn-values and average for price-values.
Is there are the way to do this? Or I will be forced to use pivoted table and prescribe the calculation rule for each measure?
I have already tried to pivot measure via their parent groups (remains and price), but this way make visualization unpretty and unreadable
Solved! Go to Solution.
Hi @Fatman121 ,
Start by creating a measure for each logic:
Remains = SUM(Table[Value])
Price = AVERAGE(Table[Value])
Then create a final measure that switches between the other measures, depending on the value of your "Measure" column.
Dynamic selection =
SWITCH( SELECTEDVALUE( Table[Measure] ) ,
"Price" , [Price] ,
"Remains" , [Remains]
)
When you use the "Measure" column as the row dimension you should get the different types of logic while only having to use the single "Dynamic selection" measure as the value in the matrix.
Hope this helps!
Br,
J
Hi @Fatman121 ,
Start by creating a measure for each logic:
Remains = SUM(Table[Value])
Price = AVERAGE(Table[Value])
Then create a final measure that switches between the other measures, depending on the value of your "Measure" column.
Dynamic selection =
SWITCH( SELECTEDVALUE( Table[Measure] ) ,
"Price" , [Price] ,
"Remains" , [Remains]
)
When you use the "Measure" column as the row dimension you should get the different types of logic while only having to use the single "Dynamic selection" measure as the value in the matrix.
Hope this helps!
Br,
J
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
56 | |
56 | |
38 | |
29 |
User | Count |
---|---|
75 | |
62 | |
45 | |
40 | |
40 |