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

Dynamically changing the values based dimen

I was going through this post

https://community.powerbi.com/t5/Community-Blog/Dynamically-change-the-information-within-a-visual-v...

 

I need to achieve a similar kind of functionality but with dimensions than measures they have created (Total Sales, Total Cost, and Total Profit) 

 

Is it possible to achieve this without unpivoting the columns?

 

Thanks,

9 REPLIES 9
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

We still need a unrelated table as a slicer to implement dynamically filter. I did some samples that you could reference. If they are not what you want, you could share some sample data and the expected result. Then we will help you to solve it.

https://community.powerbi.com/t5/Desktop/Slicer-which-can-change-currency-using-an-exchange-rate-which/td-p/735211

https://community.powerbi.com/t5/Desktop/Custom-Predefined-Date-Ranges-Prior-Year-Calculations/m-p/829440#M398460

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello,

 

Here is the sample data. Let me know if you can access it if not then I am not sure how to share the data? any clue?

I have Hierarchy from P1 till P15, I need to show these levels in a horizontal bar and when clicked on a particular level its related values should be seen in the table.

Something like this

Capture.JPG

 

In switch also, I need to create the measures but with dimensions like P1 .... P15, how is this possible?

 

Any help in this regard would be appreciable.

Thanks,

 

Hi  @Anonymous ,

I can't view the sample data. Please try to share it via DropBox.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Try this link.

This is dropbox hope it helps.

 

Thanks,

Hi @Anonymous ,

I created a sample to try. 

  • Create a disconnect table to as a slicer.

1.PNG

  • Create a measure.
Measure = 
var sel = SELECTEDVALUE('Table'[Product details])
return
SWITCH(TRUE(),sel = "P01",MAX(Sheet1[P0_L01]),sel = "P02",MAX(Sheet1[P0_L02]),1)

2.PNG

 As you seen, it will work fine when other columns show all the data. if we want to show total values of other columns, the measure will just show the max value. 

 

I attach the sample. If you need to get it by DAX, I think you could choose to show all the data. If you could unpivot table, it might work more perfectly.

 

Best Regards,

Xue Ding

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

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello Xue Ding,

 

Thanks for the reply but it is not aggregating the measures based on dimension but displaying MAX() based on the measure.

Also, as mentioned previously I can not unpivot the columns because I have 15 levels of Hierarchy with data in GB's. I tried doing it but measure values are getting impacted in a whole report.

How can we do this with DAX? could you help with it? as that will be the last option left

 

Thanks,

Zeenat

Hi @Anonymous ,

Sorry for I can't implement it perfectly with DAX. That answer is what I tried. It does have a flaw when show aggregating. After discussing with others, I think there may not be a way to fully meet your requirements.

 

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Xue Ding, Thanks a ton for your time. I appreciate it. is it possible to raise a thread to vote?

where we can change Dimensions as well dynamically like measures? 

umanbr
Frequent Visitor

You can create disconnected slicer using dimension and create a new measure using switch . measure=switch(true(),selectedvalue(table[column]="dimension1",measure to be displayed,...........))

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.