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
Data contains Language column and Metric column. We have the languages:
- English
- French
- Dutch
- Greek
Using a switch formula, I have added a column called 'Tier' where English and French is Tier 1, and Dutch and Greek is Tier 2.
Now I want to produce a table with just the tier as rows, and a 'comment' field that shows me the languages under that tier, as well as the respective value of the metric.
the metric is 'Satisfaction' and is an average of the 'Satisfied' column which contains just a 1 or 0.
Expected output:
Tier | Comment |
Tier 1 | English: 85.1% | French: 89.9% |
Tier 2 | Dutch: 91.3% | Greek: 65.0% |
I already managed to get the Languages listed in the comment field, using:
Comment = IF(ISFILTERED(data[Tier]),CONCATENATEX(VALUES(data[Language]),data[Language]&": (xxx)"," | ","All")
right now I'm struggeling to get the metric result in place of the xxx
Solved! Go to Solution.
Hi @Remco1986 ,
According to your description, here's my solution.
1.Create a calculated column in data table, get the average satisfied value for each language.
Average =
FORMAT (
CALCULATE (
AVERAGE ( data[Satisfied] ),
FILTER ( 'data', data[Language] = EARLIER ( data[Language] ) )
),
"0.0%"
)
2.Create a new table.
Table = SUMMARIZE('data','data'[Tier],'data'[Language],'data'[Average])
3.Create the comment measure in the new table.
Comment = CONCATENATEX('Table','Table'[Language]&":("&'Table'[Average]&")","|")
Get the expected result.
I attach my sample below to help you understanding.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Remco1986 ,
According to your description, here's my solution.
1.Create a calculated column in data table, get the average satisfied value for each language.
Average =
FORMAT (
CALCULATE (
AVERAGE ( data[Satisfied] ),
FILTER ( 'data', data[Language] = EARLIER ( data[Language] ) )
),
"0.0%"
)
2.Create a new table.
Table = SUMMARIZE('data','data'[Tier],'data'[Language],'data'[Average])
3.Create the comment measure in the new table.
Comment = CONCATENATEX('Table','Table'[Language]&":("&'Table'[Average]&")","|")
Get the expected result.
I attach my sample below to help you understanding.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi there, thanks for your reply. After following all steps, I managed to get the desired result. However, the produced overview was not affected by any slicers anymore (probably because the newly generated table is not linked to them).
However, using your approach, I managed to implement it in the excisting datasource. Turned out that inside the 'comment' measure, I had to summarize the table.
I also changed the percentage to be returned to a calculation of the 'satisfied' and the 'count'. Lastly, I had to implement a new dimension for 'Contact Type'.
All with all, you post surely helped me to achieve what I wanted, so I will mark it as a solution.
For good measure, here's the 'comment' measure that I have now, and that is working the way I want. No extra columns, no extra tables, just this measure in my excisting table:
Comment = IF(ISBLANK(SELECTEDVALUE(data[Tier])),BLANK(),CONCATENATEX(SUMMARIZE('data','data'[Contact Type],'data'[Tier],'data'[Language]),'data'[Language]&": "&FORMAT([(%) Satisfied],"0.0%")," | "))
(note: the 'ISBLANK' part at the beginning is to make sure the 'comment' does not appear at the total or subtotal row, and I'm also returning the measure '(%) Satisfied' in the comment because that measure already excisted and is doing a ' SUM([Satisfied] / COUNT[Satisfied] ' calculation)
Hi @Remco1986 ,
Yes, it works fine with the SUMMARIZE function in the original formula, we are helping each other!
Best Regards,
Community Support Team _ kalyj
I now did this:
Comment = IF(ISFILTERED(data[Tier]),CONCATENATEX(VALUES(data[Language]),data[Language]&": ("&FORMAT(CALCULATE(AVERAGE(data[Satisfied]),data[Language]=data[Language]),"0.0%")&")"," | ","All")
But this results in the languages having the same score as the tier. I somehow need to filter the result to be filtered on the language that the concatenatex is currently returning
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 |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |