Forum Discussion
Anonymous
4 years agoNot applicable
Count occurrences ????
I have a table which contains all possible values eg:
And I have another table :
I need to count how often each value appears like this:
But how do I realize this ?!?!
Hi,
I am not sure whether I understood your question correctly, but please check the below picture and the attached pbix file.
Occurrences: =VAR currentvalue =MAX ( 'Values'[Values] )RETURNIF (HASONEVALUE ( 'Values'[Values] ),CALCULATE ( COUNTROWS ( Data ), FILTER ( Data, Data[Column1] = currentvalue ) )+ CALCULATE ( COUNTROWS ( Data ), FILTER ( Data, Data[Column2] = currentvalue ) )+ CALCULATE ( COUNTROWS ( Data ), FILTER ( Data, Data[Column3] = currentvalue ) ))Hi,
please check the attached pbix file.
5 Replies
- Jihwan_KimSuper User
Hi,
I am not sure whether I understood your question correctly, but please check the below picture and the attached pbix file.
Occurrences: =VAR currentvalue =MAX ( 'Values'[Values] )RETURNIF (HASONEVALUE ( 'Values'[Values] ),CALCULATE ( COUNTROWS ( Data ), FILTER ( Data, Data[Column1] = currentvalue ) )+ CALCULATE ( COUNTROWS ( Data ), FILTER ( Data, Data[Column2] = currentvalue ) )+ CALCULATE ( COUNTROWS ( Data ), FILTER ( Data, Data[Column3] = currentvalue ) ))- AnonymousNot applicable
You're a hero
- AnonymousNot applicable
Jihwan_Kim How can I get the total?
- Jihwan_KimSuper User