Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello Power BI community
I Need to build a measure that can calculate 100% based on all categories for each month. I want to apply this measure to my visualized Stacked column Chart. (I know I can use a 100 % Stacked column chart to show the correct percentage) But I only want to show this measure in my tooltips and keep the original visualization.
This is my Dax code so far:
Solved! Go to Solution.
Hi @Anonymous ,
You can update the formula of measure [Percentage] as below:
Note: please update the name of date field with the correct one in the table SALESFORCE_CASES_FCT_20210429 .
| Percentage = DIVIDE ( [Total cases], CALCULATE ( [Total cases], FILTER ( ALLSELECTED ( 'SALESFORCE_CASES_FCT_20210429' ), FORMAT ( 'SALESFORCE_CASES_FCT_20210429'[Date], "YYYY-MM" ) = SELECTEDVALUE ( 'DIM_DATE'[YYYY-MM] ) ) ), 0 ) |
Best Regards
Hi @_Rena
thanks you for your help.
I don't know why but Its also works when I tried with All function.
@Anonymous , I think it should be the only case Origin in all except
Percentage = DIVIDE([Total cases],CALCULATE([Total cases],ALLEXCEPT(SALESFORCE_CASES_FCT_20210429, SALESFORCE_CASES_FCT_20210429[CASE_ORIGIN (groups)])),0)
Hello amitchandak thanks for the answer.
However, I still experienced the issue. Example, Its give me percentage of 4,41 % when it should be 40,74 %
Hi @Anonymous ,
You can update the formula of measure [Percentage] as below:
Note: please update the name of date field with the correct one in the table SALESFORCE_CASES_FCT_20210429 .
| Percentage = DIVIDE ( [Total cases], CALCULATE ( [Total cases], FILTER ( ALLSELECTED ( 'SALESFORCE_CASES_FCT_20210429' ), FORMAT ( 'SALESFORCE_CASES_FCT_20210429'[Date], "YYYY-MM" ) = SELECTEDVALUE ( 'DIM_DATE'[YYYY-MM] ) ) ), 0 ) |
Best Regards
Hi @_Rena
thanks you for your help.
I don't know why but Its also works when I tried with All function.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 34 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 74 | |
| 71 | |
| 38 | |
| 35 | |
| 25 |