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
v-srekom
Employee
Employee

Getting matrix values dynamically based on the hierarchy level

I have row hierarchy of 4 levels in a matrix. If I go to 3rd level, the values should take from 'x' column of fact table and If I go to 4th level, the values should take from 'y' column of fact table. My dataset is live conncted with the tabular model. The format will be as shown below: 

 

                                   Owner

Level1

   Level2

      Level3            value of ‘X’ column

         Level4         value of ‘Y’ column

         Level4         value of ‘Y’ column

         Level4         value of ‘Y’ column

      Level3            value of ‘X’ column

         Level4         value of ‘Y’ column

         Level4         value of ‘Y’ column

 

As I am new to Power BI, I am not able to figure out how to do this. Is there any way like creating a calculated column or is there any other approach?

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @v-srekom 

 

 

Hard to generate results without the dummy pbix/sample data. but I believe you are referring to the ISINSCOPE/ISFILTERED function, here're some articles could provide you more hints:

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/ 

https://community.powerbi.com/t5/Desktop/Calculating-measures-based-on-different-hierarchy-levels/td...

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @v-srekom 

 

 

Hard to generate results without the dummy pbix/sample data. but I believe you are referring to the ISINSCOPE/ISFILTERED function, here're some articles could provide you more hints:

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/ 

https://community.powerbi.com/t5/Desktop/Calculating-measures-based-on-different-hierarchy-levels/td...

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Greg_Deckler
Super User
Super User

@v-srekom - See if MM3TR&R helps: https://community.powerbi.com/t5/Quick-Measures-Gallery/Matrix-Measure-Total-Triple-Threat-Rock-amp-...

 

Otherwise, Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
pranit828
Community Champion
Community Champion

HI @v-srekom 

 

Please also share your sample input and if yo would like to add any more detail.





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

Explaining in detail:

I have 4 levels of row hierarchy, 

  • In the 1st 2 levels, Owner values should be empty
  • In the 3rd level, Owner values should be from IO Owner column of the fact table because the hierarchy is IO Numbers
  • In the 4th level, Owner values should be from PO Owner column of the fact table because the hierarchy is PO Numbers

As the owner values are aliases, I am not sure whether I can expose or not. 

 

 

 

 

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.