cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Kasonga2018
Frequent Visitor

I would like a slicer from a field parameter table to show certain calculation group items

Hi Have a matrix that show calculation group items such as Current value, MoM relative Change and MoM Absolute change as column header and rows as a email type. I also have a slicer from a field parameter for Total Member, Rates1 and Rates2

What I woulike to achieve is, if I select Total Member on the slicer, the matrix must only show Current Value items and MoM relative Change. and if I select Rates1 or Rate2 it must only show Current Value and MoM Absolute change. Is this possible?

Please note that my field parameter is indeed added on my matrix on the value filed

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @Kasonga2018 

Here is one type of method I've applied in similar situations, with an example PBIX attached.

 

The basic steps I applied are:

  1. Create a table that relates the Field Parameter values to Calculation Items. In my example, I used the "Order" column to identify the Field Parameter, since the visible Field Parameter column cannot be used on the 1-side of a relationship.
  2. Create a relationship between the Field Parameter and this new table, so that filtering the Field Parameter filters this table.
  3. Create an additional Calculation Group with Calculation Item that blanks out measure values unless the combination of Field Parameter & Measure exists in the table in step 1.
  4. Apply this new Calculation Item as a filter on the visual.

The end result is that filtering the field parameter effectively filters the calculation items (by blanking out unwanted calculation items).

 

OwenAuger_2-1695432334055.png

OwenAuger_3-1695432352362.png

 

Some additional screenshots:

Step 1: 'Measure Calc Item' table

OwenAuger_0-1695431947341.png

 

Step 2: Relationship between Field Parameter and 'Measure Calc Item':

OwenAuger_1-1695432132818.png

 

Step 3: New Calculation Group (TE3 DAX script):

------------------------------------------------
-- Calculation Group: 'Filter Time Intelligence'
------------------------------------------------
CALCULATIONGROUP 'Filter Time Intelligence'[Filter]    Precedence = 1

    CALCULATIONITEM "Filter based on Field Parameter" = 
        VAR RequiredCalcItems =
            VALUES ( 'Measure Calc Item'[Calcuation Item] )
        VAR CurrentCalcItem =
            SELECTEDVALUE ( TimeIntelligence[Time Calc] )
        VAR DisplayMeasure = CurrentCalcItem IN RequiredCalcItems
        RETURN
            IF ( DisplayMeasure, SELECTEDMEASURE ( ) )

 

Does something like this work for you?

 

Regards,


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hi @Kasonga2018 

Here is one type of method I've applied in similar situations, with an example PBIX attached.

 

The basic steps I applied are:

  1. Create a table that relates the Field Parameter values to Calculation Items. In my example, I used the "Order" column to identify the Field Parameter, since the visible Field Parameter column cannot be used on the 1-side of a relationship.
  2. Create a relationship between the Field Parameter and this new table, so that filtering the Field Parameter filters this table.
  3. Create an additional Calculation Group with Calculation Item that blanks out measure values unless the combination of Field Parameter & Measure exists in the table in step 1.
  4. Apply this new Calculation Item as a filter on the visual.

The end result is that filtering the field parameter effectively filters the calculation items (by blanking out unwanted calculation items).

 

OwenAuger_2-1695432334055.png

OwenAuger_3-1695432352362.png

 

Some additional screenshots:

Step 1: 'Measure Calc Item' table

OwenAuger_0-1695431947341.png

 

Step 2: Relationship between Field Parameter and 'Measure Calc Item':

OwenAuger_1-1695432132818.png

 

Step 3: New Calculation Group (TE3 DAX script):

------------------------------------------------
-- Calculation Group: 'Filter Time Intelligence'
------------------------------------------------
CALCULATIONGROUP 'Filter Time Intelligence'[Filter]    Precedence = 1

    CALCULATIONITEM "Filter based on Field Parameter" = 
        VAR RequiredCalcItems =
            VALUES ( 'Measure Calc Item'[Calcuation Item] )
        VAR CurrentCalcItem =
            SELECTEDVALUE ( TimeIntelligence[Time Calc] )
        VAR DisplayMeasure = CurrentCalcItem IN RequiredCalcItems
        RETURN
            IF ( DisplayMeasure, SELECTEDMEASURE ( ) )

 

Does something like this work for you?

 

Regards,


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn
Kasonga2018
Frequent Visitor

Hi all, is there anyone willing to help please? Basically, I just need to control what column from the calculation groups items to show on the matrix based on my slicer selection (Slicer is a field parameter for measures)

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors