Forum Discussion
Filter with 2 columns
- 6 years ago
hi stoss
Just adjust the formula as below:
New Measure = VAR __rec = SELECTEDVALUE ( message[recipient] ) VAR __id = SELECTEDVALUE(message[MessageTraceId]) VAR __cc = CALCULATE( COUNTROWS( message ), ALLSELECTED( message[recipient] ), message[MessageTraceId] = __id ) VAR __cx = CALCULATE(COUNTROWS( message ),ALL(message),message[MessageTraceId]=__id) RETURN IF ( __cc = __cx, __cx, 0 )Then use it as visula level filter:
Regards,
Lin
parry2k I put my private data into your pbix and it doesn't work like excpected 😞
stoss that's not good. share sample data in pbix file and I will take a look. I probably missed something and doesn't have full picture on how your data looks like.
Removing sensitive information before sharing.
- stoss6 years agoFrequent Visitor
parry2k you will find the pbix in the link below.
https://drive.google.com/file/d/153NtCOuGPQLGiUmJY8XsfVLmkO88FnKi/view?usp=sharing
The goal is to count only messages with gmail.com and/or yahoo.com.
The result should be 3, with following IDs :
123-456
456-789
252-973 - stoss6 years agoFrequent Visitor
parry2k you will find the pbix in the below link.
https://drive.google.com/file/d/153NtCOuGPQLGiUmJY8XsfVLmkO88FnKi/view?usp=sharing
The goal is to count only messages with gmail.com and/or yahoo.com.
The result should be 3, with following IDs :
123-456
456-789
252-973 - v-lili6-msft6 years agoCommunity Support
hi stoss
Just adjust the formula as below:
New Measure = VAR __rec = SELECTEDVALUE ( message[recipient] ) VAR __id = SELECTEDVALUE(message[MessageTraceId]) VAR __cc = CALCULATE( COUNTROWS( message ), ALLSELECTED( message[recipient] ), message[MessageTraceId] = __id ) VAR __cx = CALCULATE(COUNTROWS( message ),ALL(message),message[MessageTraceId]=__id) RETURN IF ( __cc = __cx, __cx, 0 )Then use it as visula level filter:
Regards,
Lin
- stoss6 years agoFrequent Visitor
v-lili6-msft Thank you for you help. Looks better now
As there is "MessageTraceId" present in the table, I can't count per month on one line.
When I remove "MessageTraceId", the table becomes empty.
I would like a table like that :2019 December 3
Many thanks again v-lili6-msft and parry2k for you help.
- v-lili6-msft6 years agoCommunity Support
HI stoss
For the row context of the visual has changed, the [New Measure] has been changed too.
So for your case, just add a new measure
Count MessageTraceld = VAR _TABLE=ADDCOLUMNS(SUMMARIZE(message,message[_time],message[MessageTraceId]),"_A",[New Measure]) RETURN COUNTAX(FILTER(_TABLE,[_A]>=1),[MessageTraceId])and remove the visual level filter of this table visual.
Regards,
Lin
- stoss6 years agoFrequent Visitor
It works, thank you very much v-lili6-msft and parry2k