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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

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
November Carousel

Fabric Community Update - November 2024

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

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.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.