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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Categorize/Group calculated measures in matrix based on measure-name.

Hi,

 

I've been trying to find a similar case as mine - but I can't find any solution so I'll give it a try:

I have a table of calculated measures - each one with their own definitions - and they look like this in my matrix today (for example):

 

1234 Investments | 50 000

5678 Investments | 60 000

4321 Investments | 70 000
1234 Total ending balance | 100 000
5678 Total ending balance | 150 000
4321 Total ending balance | 200 000

However, now need it to look like this:

                                      1234         |   5678       |   4321

Investments               |   50 000      |  60 000     |  70 000

Total ending balance |   100 000   |   150 000  |   200 000

 

Is this there any simple way of doing this? It feels like it should.

 

Kind regards

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

Hi @Anonymous ,

 

As we know, measure is metadata, we can't "calculate" the name of measure and choose that corresponding measure. You have to hardcode the condition to check selected "measure" name and return corresponding measure.

 

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

View solution in original post

6 REPLIES 6
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

As we know, measure is metadata, we can't "calculate" the name of measure and choose that corresponding measure. You have to hardcode the condition to check selected "measure" name and return corresponding measure.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Can you elaborate on your comment, "You have to hardcode the condition to check selected 'measure' name and return corresponding measure?"

 

I have several measures that fall into the categories Budgeted, Scheduled, Started, etc. that are calculated from three different fact tables.  The measures all basically sum values using filters based on conditions of other fields in those tables as well as  relationships from those to my one calendar table.  Here are some examples (with each a subset of the prior):

 

Cost: Estimate = SUM(WorkOrderInformation[Estimate])
Cost: Scheduled Finish = CALCULATE([Cost: Estimate], USERELATIONSHIP('Calendar: Financial'[Date], WorkOrderInformation[DateScheduleFinish]))
Cost: Started = CALCULATE([Cost: Scheduled Finish], WorkOrderInformation[Status] IN {"Completed", "Field Complete", "In Progress"})

 

The resulting matrix is readable, but could be improved upon if I could categorize these measures with this "hard coding" you mentioned on the columns.  I've done all I can with the limitations of visualization grids and outlines.  I've also tried just inserting boxes as a work-around, only to be frustrated when the columns have to resize to show the values.

 

screen shot.jpg

JirkaZ
Solution Specialist
Solution Specialist

@Anonymous I'm a bit lost - is the result of a measure the entire line? eg. "1234 Investments | 50 000"?

Anonymous
Not applicable

Hi @JirkaZ 

Sorry. "1234 Investments" is the name of the measure.
50 000 in this case is the value of the measure.

Kind regards

JirkaZ
Solution Specialist
Solution Specialist

@Anonymous Then I would suggest to fix your model as "1234" and "Investments" should  be two different dimensions. 
I don't think there's a way to do what you want to do - especially since those are measures and not columns.

Anonymous
Not applicable

Hi again @JirkaZ ,

That's what I feared - I knew that this would be one solution, but not preferable due to... time 🙂 

Hoped that I could solve this using som DAX-magic.


Thank you for your time and your advice.

Kind regards.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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