Forum Discussion
Help with % by category
- 2 years ago
Hi,
Sorry I don't think I understand 100%. I cannot get the number, that you provided, by pbix file.
I assume you are asking about the below?
Please check the below picture and the attached pbix file.
Hi,
I am not sure if I undeststood your question correctly, but please check the below picture and the attached pbix file.
% Status =
DIVIDE (
CALCULATE (
DISTINCTCOUNT ( 'Planilha1'[Documento_de_compras] ),
'Planilha1'[Aderencia na Cadeia]
= SELECTEDVALUE ( Planilha1[Aderencia na Cadeia] ),
ALLSELECTED ( Planilha1 )
),
CALCULATE (
DISTINCTCOUNT ( 'Planilha1'[Documento_de_compras] ),
ALLSELECTED ( Planilha1 )
)
)
Hi Jihwan_Kim ,
Thanks for your help.
But unfortunately it was not what I expected. Trying to explain it better what I need is really the total percentage of the categories over the months.
In excel through pivot table I get what I need, a percentage of my 2 categories. I needed to reproduce in Power BI, but the DIVIDE measure with my parameters is not working well.
PBI:
Excel:
I save the excel file example on same folder:
https://1drv.ms/u/s!Avq1zGJizBimsUCECKbCmKD7UL7g?e=yZmBqc
- Jihwan_Kim2 years ago
Super User
Hi,
Sorry I don't think I understand 100%. I cannot get the number, that you provided, by pbix file.
I assume you are asking about the below?
Please check the below picture and the attached pbix file.
- Anonymous2 years agoNot applicable
Thanks Jihwan_Kim for your help, I had a little adjust in the measure
Distinct:
CALCULATE(DISTINCTCOUNT('STO'[Documento_de_compras]))Distinct 2:CALCULATE(DISTINCTCOUNT('STO'[Documento_de_compras]), REMOVEFILTERS('STO'[Aderencia na Cadeia]), 'STO'[Aderencia na Cadeia]<>BLANK())Thanks for all.
- Anonymous2 years agoNot applicable
Hi,Anonymous
Can you tell me if your problem is solved? If yes, please accept Jihwan_Kim 'sreply as solution.
If you have already solved it yourself,share your solution and accept it as a solution that will help other community members who have the same problem as you.Best Regards,
Leroy Lu