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
Hello,
I'm trying to do something that should be so simple... I want to get the table below. For my measures, I have the following:
measure1 = DISTINCTCOUNT(contacts[individualid])
measure2 = CALCULATE([measure1],ALLSELECTED(AgeBands[Age Band]))
measure3 = [measure1]/[measure2]
I'm happy that measure1 and measure3 are doing what they should, but measure2 is just giving me the same numbers as measure1, instead of giving me the total number of contacts in that region. Annoyingly, I can easily get measure3 by using "% of column total" in a matrix visual, but I can't do that in a line chart, which is what I ultimately want to have. My measure3 is currently just giving me 100% as measure1 and measure2 are identical.
My table visual is filtered on Region (there are other regions that I don't want to show in this analysis), and also one other field (let's call it Customer Type). I've tried what feels like every permutation of ALL, ALLEXCEPT, ALLSELECTED, KEEPFILTERS, REMOVEFILTERS... I keep getting the same results. Help!
Age Band | Region | (measure1) - total contacts | (measure2) - total contacts disregarding age band | (measure3) - % of contacts in this region who fall into this age band |
Under 20 | South | 20 | 100 | 20% |
Under 20 | North | 40 | 50 | 90% |
Under 20 | West | 6 | 20 | 30%
|
Any ideas, anyone? I still don't understand why this isn't working as expected.
Oh, and the age bands table is related to the contacts table - but I've also tried having a field for age bands on the contacts table itself (adding it in Power Query) and had the same problems.
Hi @s--turn ,
Another way to be independent of slicers is to create a calculated column. Here are the steps.
Create a measure.
Measure =
DISTINCTCOUNT ( AgeBands[individual id] )
Create two columns.
Column 1 =
CALCULATE (
DISTINCTCOUNT ( AgeBands[individual id] ),
FILTER ( 'AgeBands', 'AgeBands'[Region] = EARLIER ( AgeBands[Region] ) )
)
Column 2 =
DIVIDE ( [Measure], 'AgeBands'[Column 1] )
And you can also put them in a line chart.
Final output:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ xiaosun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-xiaosun-msft , thank you for replying. I@ve tried that technique but unfortunately it still doesn't quite do what I need. Please see images below. The line chart, at first glance, looks better (Region is on the Legend), but when I convert it into a matrix, I can see that the figures for each Region do not add up to 100%. What I'm trying to show is the relative distribution of ages in each region, so that we can say (for example) that Region X has a younger profile than Region Y.
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 |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |