Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Power BI newbie here
I'm trying to calculate Percentage of each category in a given month and display via line graph to show the trend
Data is as below:
| Date | ID | Category |
| 1/1/2021 | A001 | Standard |
| 1/1/2021 | A002 | Standard |
| 1/1/2021 | A003 | Emergency |
| 1/4/2021 | A004 | Emergency |
| 1/5/2021 | A005 | Standard |
| 1/6/2021 | A006 | Standard |
| 1/7/2021 | A007 | Emergency |
| 1/8/2021 | A008 | Standard |
| 2/1/2021 | A009 | Standard |
| 2/2/2021 | A010 | Emergency |
| 2/3/2021 | A011 | Standard |
| 2/3/2021 | A012 | Standard |
| 2/3/2021 | A013 | Emergency |
| 2/6/2021 | A014 | Standard |
| 2/7/2021 | A015 | Standard |
| 2/7/2021 | A016 | Standard |
| 2/9/2021 | A017 | Emergency |
| 2/10/2021 | A018 | Standard |
| 3/1/2021 | A019 | Standard |
| 3/1/2021 | A020 | Emergency |
| 3/1/2021 | A021 | Emergency |
| 3/4/2021 | A022 | Standard |
| 3/6/2021 | A023 | Emergency |
| 3/6/2021 | A024 | Standard |
| 3/7/2021 | A025 | Emergency |
What is want to show is for each month (Jan, Feb, March etc..) what is the % of Standard of the total for that month and calculate the same for each month
Solved! Go to Solution.
Hi @Anonymous ,
Check the measure.
Measure =
var _total = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),'Table'[Date].[Month]=SELECTEDVALUE('Table'[Date].[Month])))
var _category = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),'Table'[Date].[Month]=SELECTEDVALUE('Table'[Date].[Month])&&'Table'[Category]=SELECTEDVALUE('Table'[Category])))
return
_category/_total
Best Regards,
Jay
Hi @Anonymous ,
Check the measure.
Measure =
var _total = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),'Table'[Date].[Month]=SELECTEDVALUE('Table'[Date].[Month])))
var _category = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),'Table'[Date].[Month]=SELECTEDVALUE('Table'[Date].[Month])&&'Table'[Category]=SELECTEDVALUE('Table'[Category])))
return
_category/_total
Best Regards,
Jay
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 63 | |
| 49 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 122 | |
| 118 | |
| 38 | |
| 36 | |
| 29 |