Forum Discussion
speedramps
Super User
4 years agoHow to create % of All using field parameters?
Power Bi have included a new “Field Parameters” feature in the May 2022 release. I have created the following example, but you will need to enable the “Field Parameters” preview features to try it...
speedramps
Super User
4 years agoPlease can someone translate the suggestion and I will try it. Thank you.
- v-easonf-msft4 years ago
Community Support
Hi, speedramps
I am sorry for my mistake. My default browser caused it to be automatically translated when I publish.
You should modify measure 'Order items' and measure 'Despatch items' instead of field parameter table Metrics[Metric]. Also, there is no actual numerical data in Table 'Metrics' to apply the 'SUM' function.
Please modify your original formulas as follows:
Ordered items = VAR a = CALCULATE ( COUNTROWS ( Facts ), USERELATIONSHIP ( 'Calendar'[Date], Facts[Order date] ) ) VAR b = CALCULATE ( COUNTROWS ( Facts ), ALL ( 'Calendar' ), USERELATIONSHIP ( 'Calendar'[Date], Facts[Order date] ) ) RETURN a / bDespatch items = VAR a = CALCULATE ( COUNTROWS ( Facts ), USERELATIONSHIP ( 'Calendar'[Date], Facts[Depatched date] ) ) VAR b = CALCULATE ( COUNTROWS ( Facts ), ALL ( 'Calendar' ), USERELATIONSHIP ( 'Calendar'[Date], Facts[Depatched date] ) ) RETURN a / bFor more details ,please check my sample file.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.