Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello All,
I am working with data set where I have youth_ID, start_date, end_date, region (table with duplicate youth_id). I have sliclers for start_date, end_date, region. Now, I want to create card where if user select a particular region for particular date range the card should display percent of youth in that region based on the total count of that time range.
eg. I have total 1035 unique youth's in dataset. If I select particular date range for a region deominator should remain constant (eg. theer are 25 unique youth's after Jan 1, 2021) and numberator will change as per the selections.
I calutated numerator and denominator using below formula:
num = CALCULATE(DISTINCTCOUNT('part-2_YA_engagement'[youth_id]))
den = CALCULATE(DISTINCTCOUNT('part-2_YA_engagement'[youth_id]),ALL('part-2_YA_engagement'[region]))
per = num/den
I above approch my denominator changes as I select different regions.
Please advice on how Can I do this calculations.
@saurabhpore , Try like
num = CALCULATE(DISTINCTCOUNT('part-2_YA_engagement'[youth_id]))
den = CALCULATE(DISTINCTCOUNT('part-2_YA_engagement'[youth_id]),ALL('part-2_YA_engagement'))
per = num/den
hello,
I tried that approach but it gives me total unique youths rather than unique youth count for selected slicers.
@saurabhpore ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. with couple of use case
Hello,
Please follow below link to download the pbix file.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
23 | |
21 | |
20 | |
13 | |
12 |
User | Count |
---|---|
43 | |
31 | |
24 | |
23 | |
22 |