Forum Discussion
cottrera
4 years agoPost Prodigy
DAX percentage Query
Hi
I have a hard coded number 2,508
I also have a table visual for which the % figure will change daily.
| Trade | % Split |
| Elec | 30% |
| Multi | 51% |
| Plumbing | 10% |
| ROUTINE_EXTERNAL | 0% |
| ROUTINE_INTERNAL | 0% |
| UVPC / Carp | 9% |
Is it possible to use DAX to calculate the pecentage of the hard coded figure using the percentages above.
| Trade | % Split | Expected DAX Result |
| Elec | 30% | 752 |
| Multi | 51% | 1269 |
| Plumbing | 10% | 253 |
| ROUTINE_EXTERNAL | 0% | 0 |
| ROUTINE_INTERNAL | 0% | 0 |
| UVPC / Carp | 9% | 233 |
thanks
Richard
Hi cottrera ,
Please try this:-
Measure = VAR Num = 2508 RETURN ( Num * ( [% Split] * 100 ) ) / 100Thanks,
Samarth
4 Replies
- Samarth_18Community Champion
Hi cottrera ,
Please try this:-
Measure = VAR Num = 2508 RETURN ( Num * ( [% Split] * 100 ) ) / 100Thanks,
Samarth
- cottreraPost Prodigy
Thank you Samarth_18 for replying quickly your method worked fine
- PijushRoyCommunity ChampionPlease use the Calculation
Measure = VAR HardNum = 2508VAR CategoryPercent = SELECTEDVALUE('Table'[% Split])ReturnHardNum * CategoryPercent
IF SOLVED, PLEASE GIVE KUDO- cottreraPost Prodigy
Hi PijushRoy
Thank you for responding. Unfortunatly this does not resolve me issue as the percentages I am using already come from a DAX functionand cannor be uses here ('Table'[% Split])The table I showed in my example is a visual table not a data base table the % split is a DAX function