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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Show column in matrix when slicer is picked (but when slicer is using dynamic measure)

Hello,

 

I have a matrix where I put in Rows "Category", in Column I have nothing and in Values I have several calculated measures (sum of values, of units, etc.) that takes into account which period is selected in my slicer. So the matrix is showing the measures names in columns.

My slicer is like "period1, period2, etc". 

When I pick "period1" I see in the matrix the sum of value for period1, the sum of units of period1, etc.

When I pick "period2" I see in the matrix the sum of value for period2, the sum of units of period2, etc.

 

But for some other periods, I need to see a new calculated measure in my matrix. And I don't know if it is possible, I can't find a way. The idea is if I pick "period3" I could see in the matrix a new column showing "avg price" for exemple. And if I pick again "period1" the column "avg price" desappears.

 

Is that possible? Is my question clear?

 

Thank you in advance for your help,

 

DM_SO

1 ACCEPTED SOLUTION
zoloturu
Memorable Member
Memorable Member

Hi @Anonymous ,

 

There are two options which can solve your problem.

 

1) Bookmarks and buttons.

  1. Change filtering by slicer to filtering by buttons. At least 3 buttons required: Period1, Period2, Period3
  2. Then create and configure 3 bookmarks for each button respectively.

Once you press a button Period1 then bookmark1 runs, the same for other 2 cases.

 

2) Create a common DAX measure using conditions and virtual relationships.

  1. You create a sepate table with 1 column as set of your periods (Period1, Period2, Period3).
  2. Then create a slicer from it.
  3. Create 3 measures (if not exist) for each type of period. Let's say Measure1, Measure2 and Measure3.
  4. Write a measure Measue4 in following way: if selected value from new table is Period1 then calculate Measure1, if Period2 then Measure2 and if Period3 then Measure3.
  5. Put Measure4 to values.

Regards,
Ruslan Zolotukhin (zoloturu)
BI Engineer at Akvelon Inc. / Kharkiv Power BI User Group Leader / DAX & Power BI Trainer
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!


You are from Ukraine? If yes then welcome to Power BI User Group - KhPUG website. Other country? Check and find proper one - Power BI User Groups

View solution in original post

1 REPLY 1
zoloturu
Memorable Member
Memorable Member

Hi @Anonymous ,

 

There are two options which can solve your problem.

 

1) Bookmarks and buttons.

  1. Change filtering by slicer to filtering by buttons. At least 3 buttons required: Period1, Period2, Period3
  2. Then create and configure 3 bookmarks for each button respectively.

Once you press a button Period1 then bookmark1 runs, the same for other 2 cases.

 

2) Create a common DAX measure using conditions and virtual relationships.

  1. You create a sepate table with 1 column as set of your periods (Period1, Period2, Period3).
  2. Then create a slicer from it.
  3. Create 3 measures (if not exist) for each type of period. Let's say Measure1, Measure2 and Measure3.
  4. Write a measure Measue4 in following way: if selected value from new table is Period1 then calculate Measure1, if Period2 then Measure2 and if Period3 then Measure3.
  5. Put Measure4 to values.

Regards,
Ruslan Zolotukhin (zoloturu)
BI Engineer at Akvelon Inc. / Kharkiv Power BI User Group Leader / DAX & Power BI Trainer
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!


You are from Ukraine? If yes then welcome to Power BI User Group - KhPUG website. Other country? Check and find proper one - Power BI User Groups

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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