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
Hi, I am trying to show count of distinct AgeGroup-ID for each country-ID from the top 20% of Data set.
so first i created Rank as
I want to show Country and distinct count of AgeGroup-ID as a matrix for Rank <20 (ie. top 20% of my dataset) and also when i filter on Country ID or Gender the calcualtion should be applied on the filtered dataset.
Solved! Go to Solution.
Hi, @Rockyalex
You can try the following methods.
Measure:
CountAgeGroup-ID =
CALCULATE (
DISTINCTCOUNT ( 'FACT-Population'[AgeGroup-ID] ),
FILTER (
ALL ( 'FACT-Population' ),
[Rank] <= 20
&& [Country-ID] = SELECTEDVALUE ( 'FACT-Population'[Country-ID] )
)
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Rockyalex
You can try the following methods.
Measure:
CountAgeGroup-ID =
CALCULATE (
DISTINCTCOUNT ( 'FACT-Population'[AgeGroup-ID] ),
FILTER (
ALL ( 'FACT-Population' ),
[Rank] <= 20
&& [Country-ID] = SELECTEDVALUE ( 'FACT-Population'[Country-ID] )
)
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you it worked perfectly.
what if i want to see the Details of AgeGroup id under the Country in the Matrix ? currenly you cannot expand the Country ID to see what AgeGroup ID's are in it (currently .
Thanks & Regards,
Alex
@Rockyalex , Use rank in the visual level filter of create a measure like
Total Filter population = Sumx(filter(
Addcolumns( Summarize('FACT-Population'[Country-ID],'FACT-Population'[AgeGroup-ID],'FACT-Population'[Gender]),"_1"
calculate(sum('FACT-Population'[Population])), "_2",m [Rank]) ,[_2]<= 20) ,[_1])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
168 | |
116 | |
63 | |
57 | |
50 |