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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Coffee321
Frequent Visitor

Switch Measure in Matrix with multiple columns

What's the best way to switch a measure in a matrix with multiple columns? The below matrix uses fours different measures based on amounts (dollars):

Coffee321_0-1720219415443.png

[Actuals] = Measure of the current period's amounts in dollars
[Actuals PP] = Measure of the previous period amounts in dollars
[Actuals Var $] = Measure of Variance in dollars
[Actuals Var %] = Measure of Variance in percentage

I would like to show all columns but be able to switch the base of all measures between the following:

- dollars (all 4 measures mentioned above are based on this)
- volume (quantities of units, which is a separate column in the fact table in addition to dollars) and,
- rate/price (dollars divided by quantity)

In other words, show 4 columns of actuals, prior period, variance in $, and variance in % and be able to switch between dollars, quantity, and rate/price. I can do this now, but I have to take out all 4 measures mentioned above manually and put four measures based on volume and do the same but for rate/price. Would a calculation group allow me to do this (switch between dollars, volume, and quantity) by just using a slicer? Any help will be greatly appreciated.



 

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @Coffee321 
It sounds like field parameters, please check the attached link :
https://www.youtube.com/watch?v=V6WchPDZibI&t=3s

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

vigneshba
Frequent Visitor

Hi @Coffee321 - This can be done by following approach

1. We have to create table with the values to be listed in the Filter. Dollars, Volume, Per Unit
2. Create 4 Measurements as below

a. Actuals = SWITCH(SELECTEDVALUE('Filter'[Measure]), "Dollars", SUM(Data[Actuals $]), "Volume", SUM(Data[Actuals Vol]), "Per Unit", SUM(Data[Actuals Per Unit]), BLANK())

b. Actuals PP = SWITCH(SELECTEDVALUE('Filter'[Measure]), "Dollars", SUM(Data[Actuals PP $]), "Volume", SUM(Data[Actuals PP Vol]), "Per Unit", SUM(Data[Actuals PP Per Unit]), BLANK())

c. Var = [Actuals] - [Actuals PP]

d. Var % = (ABS([Actuals]) - ABS([Actuals PP])) / ABS(([Actuals]))

vigneshba_0-1720290608953.pngvigneshba_1-1720290643906.pngvigneshba_2-1720290676063.png

In this way, we can achieve your requirement. Let me know if you want more details or any related questions

 

View solution in original post

3 REPLIES 3
vigneshba
Frequent Visitor

Hi @Coffee321 - This can be done by following approach

1. We have to create table with the values to be listed in the Filter. Dollars, Volume, Per Unit
2. Create 4 Measurements as below

a. Actuals = SWITCH(SELECTEDVALUE('Filter'[Measure]), "Dollars", SUM(Data[Actuals $]), "Volume", SUM(Data[Actuals Vol]), "Per Unit", SUM(Data[Actuals Per Unit]), BLANK())

b. Actuals PP = SWITCH(SELECTEDVALUE('Filter'[Measure]), "Dollars", SUM(Data[Actuals PP $]), "Volume", SUM(Data[Actuals PP Vol]), "Per Unit", SUM(Data[Actuals PP Per Unit]), BLANK())

c. Var = [Actuals] - [Actuals PP]

d. Var % = (ABS([Actuals]) - ABS([Actuals PP])) / ABS(([Actuals]))

vigneshba_0-1720290608953.pngvigneshba_1-1720290643906.pngvigneshba_2-1720290676063.png

In this way, we can achieve your requirement. Let me know if you want more details or any related questions

 

Ritaf1983
Super User
Super User

Hi @Coffee321 
It sounds like field parameters, please check the attached link :
https://www.youtube.com/watch?v=V6WchPDZibI&t=3s

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks. I don't think that will work because I will need 12 different parameters in a slicer and I will be able to only look at one column at a time in the matrix. What I'm after is this:

Slicer with three options:

Coffee321_0-1720267016993.png

And that slicer, filtering the matrix like this:

When selecting dollars, all 4 columns (4 measures) will show amounts in dollars

Coffee321_1-1720267099398.png

When selecting volume, all 4 columns (measures) will show measures based on volumes:

Coffee321_2-1720267182126.png

 

When selecting Per Unit, all 4 columns will show per unit:

Coffee321_3-1720267237217.png

 







Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.