Forum Discussion
count with parameter
- Anonymous4 years ago
Hi Vitor_sp_bo ,
Do you mean using the parameters in Power bi desktop to count, I have an example here
I created some data:
Custom rules:
Use parameters to display the top N names, and calculate how many IDs the top N names in each group have.
Here are the steps you can follow:
1. Modeling – New parameter.
2. Create measure.
rank = RANKX(ALL('CountTable'),CALCULATE(SUM('CountTable'[Amount])),,ASC)count= COUNTX(FILTER(ALL(CountTable),'CountTable'[group]=MAX('CountTable'[group])&&[rank]<=[Parameter Value]),[group])3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Vitor_sp_bo ,
Do you mean using the parameters in Power bi desktop to count, I have an example here
I created some data:
Custom rules:
Use parameters to display the top N names, and calculate how many IDs the top N names in each group have.
Here are the steps you can follow:
1. Modeling – New parameter.
2. Create measure.
rank = RANKX(ALL('CountTable'),CALCULATE(SUM('CountTable'[Amount])),,ASC)count=
COUNTX(FILTER(ALL(CountTable),'CountTable'[group]=MAX('CountTable'[group])&&[rank]<=[Parameter Value]),[group])
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly