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

Matrix - Different measure with different level of granularity

Hello everyone,

 

I have a matrix with different level of granularities:

  • Contract 1: XXXXX
    • Project 1.1: XXXXX/ABC
    • Project 1.2: XXXXX/DEF
    • ...
    • Project 1.6
      • Risk 1
      • Risk 2
      • Risk 3
  • Contract 2: YYYYY
    • Project 2.1: YYYYY/ABC
      • Risk 1
      • Risk 2
      • ...

I want to put a measure in column, but the measure should do different calculations at Contract level (sum the related projects) and project level (find a value in a related table), and return nothing at Risk level.

 

Any hint? I have tried with HASONEVALUE for risks, IF(HASONEVALUE(RiskNumber), "", IF(HASONEVALUE(Contract), SUM(...)...

 

But I have Project with only 1 risk, which then makes the related project and contract to have also "" 

 

If you have any ideas to get me started on the right path.

 

Thank you for your time,

Tom

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

hi  @Anonymous 

You could get it by use ISINSCOPE Function to create a IF measure, see more detail as below:

https://xxlbi.com/blog/new-dax-function-isinscope/

 

Regards,

Lin

Community Support Team _ Lin
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

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

You could get it by use ISINSCOPE Function to create a IF measure, see more detail as below:

https://xxlbi.com/blog/new-dax-function-isinscope/

 

Regards,

Lin

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

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.