March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Good afternoon to all,
I have the necessity to show in a single column of a matrix different measures.
I found some tips in the forum so I followed these steps:
1) Calculated all the measures;
2) Created a table with two columns; first: Id, second: the descriptions of the row i want to show;
3) Created a measure to expose each measure calculated in step1 into the matrix. The measure is this:
Each row has the correct value calculated in point 1 and even the grand total is correct.
Now I come to the point.
I applied some multiplication in each measure to make a what if analysis.
If I check the value of each measure it is correct while if i put it into the matrix (with the same method) it doesn't return me the right value.
I give you an example:
I would like that the value shown in the firs row could be 7.383.084,67€ while it returns me another value. Even the grand totale is wrong
Probably there is some issue with the filter context.
Can you help me?
Thank you
Enrico
Solved! Go to Solution.
@ermeggy_1298 @v-linyulu-msft in my opinion you have to give the granularity of the sector in your measures, like:
Thanks for the reply from @BeaBF , please allow me to provide another insight:
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.Since the output contains multiple judgment statements, I recommend using the SWITCH() function. Here are my calculation columns:
Importo geo settoriale =
SWITCH(TRUE(),
[Settore] = "Agricoltura" ,[EAD_AGRICOLTURA]*[EAD_INDUSTRIA],
[Settore] = "Amministrazioni pubbliche", [EAD_AMM.PUBBLICHE],
[Settore] = "Edilizia", [EAD_EDILIZIA],
[Settore] = "Famiglie consumatrici", [EAD_FAMIGLIE],
[Settore] = "Imprese finanziarie ed assicurative", [EAD_IMPRESE],
[Settore] = "Industria", [EAD_INDUSTRIA],
[Settore] = "Servizi", [EAD_SERVIZI],
BLANK())
In My calculation columns, you can modify the output to add, subtract, multiply, divide, and so on.
3.Here's my final result, which I hope meets your requirements.
4.The following are links to related documents, hope to help you:
SWITCH function (DAX) - DAX | Microsoft Learn
Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Good afternoon,
I tried with the solution you gave but it is not working.
I provide you a link where you can download the file I am working with:
Please consider the sheet "Hp2_rischio di conc.geo-settoriale stress".
I tried to write three measues with 3 different methods:
@ermeggy_1298 @v-linyulu-msft in my opinion you have to give the granularity of the sector in your measures, like:
Thanks to your advice I found the solution. The problem was that the "layout" table in which there are the sectors names is connected to the data table so the filter context was activated.
I created a new layout teble which is not relate to the data table and now all the calculated measures are reported correctly in the calculated column.
Enrico
I tried even this measure but it doesn't work.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
12 | |
9 | |
7 |
User | Count |
---|---|
38 | |
32 | |
28 | |
12 | |
11 |