Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am tasked with emulating a Tableau dashboard. I have successfully created the visuals that look the Tableau one, but the Tableau has a Mark/custom column called '% of Distinct Count of StudentID', which details the percent of Student divided by the total number of Students for that year. For example, the visual details '300' students, in "Points Earned" bracket '34', during Year '2018'. "Year" is along the X-axis, with "Distinct Count of StudentID" (counting the number of students) on the Y-axis, and "Points Earned" as a Legend.
I need to create a DAX measure that calculates the % of students from a 'Year' and a 'Points Earned' bracket against the total number of students from that Year. For example, '300' students, in "Points Earned" bracket '34', during Year '2018' divided by '4000' total students from '2018', should give 7.5%.
My current DAX is:
TL:DR - Need help making a DAX measure that calculates: Number of Student ID / Total Number of Students for each Year (Percentage format)
Any help would be greatly appreciated.
Solved! Go to Solution.
@Breen
Bsed on the limited details, I modifed your measure assuming you are using the Year and this measure on a visual like a table visual.
Percentage_UCAS_CC =
DIVIDE (
[StudentIDs],
CALCULATE ( [StudentIDs], ALLSELECTED ( 'DataSource'[Points Earned] ) )
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Breen
Bsed on the limited details, I modifed your measure assuming you are using the Year and this measure on a visual like a table visual.
Percentage_UCAS_CC =
DIVIDE (
[StudentIDs],
CALCULATE ( [StudentIDs], ALLSELECTED ( 'DataSource'[Points Earned] ) )
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
This worked perfectly, thank you!
Hi @Breen
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
User | Count |
---|---|
123 | |
76 | |
62 | |
50 | |
49 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |