Forum Discussion
Show values based on filter and text string
- 4 years ago
Hi Divous ,
Please create the measure and filter the visual with measure.
Measure = VAR SelectDate = SELECTEDVALUE ( Dates[Date] ) VAR _id = CALCULATETABLE ( VALUES ( Table01[customer_id] ), FILTER ( ALLSELECTED ( Table01 ), Table01[date] = SelectDate && Table01[info] = "big" ) ) RETURN IF ( SelectDate = BLANK (), 1, COUNTROWS ( INTERSECT ( VALUES ( Table01[customer_id] ), _id ) ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Divous , Make sure you use independent date table in slicer
//Date1 is independent Date table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _tab = summarize(filter(all(Table),Table[date] =_max), [customer_id])
return
calculate(count(Table[customer_id]), filter(Table, Table[customer_id] in _tab))
Hi amitchandak
thanks for your response.
I create independent Date table and try to use your measure, but probably I dont know how.
- v-kkf-msft4 years agoCommunity Support
Hi Divous ,
Please create the measure and filter the visual with measure.
Measure = VAR SelectDate = SELECTEDVALUE ( Dates[Date] ) VAR _id = CALCULATETABLE ( VALUES ( Table01[customer_id] ), FILTER ( ALLSELECTED ( Table01 ), Table01[date] = SelectDate && Table01[info] = "big" ) ) RETURN IF ( SelectDate = BLANK (), 1, COUNTROWS ( INTERSECT ( VALUES ( Table01[customer_id] ), _id ) ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Divous4 years agoHelper III
Hi v-kkf-msft Winniz,
thanks for your response!
It looks great!
But, I have found that I need little polishing. I have in the "info" column not only the "big" itself, but it can also be in a sentence. For example, "he wants a big size." So I need to filter that too.EDIT:
I use CONTAINSTRING in part of checking "big" and its working.
Winniz, everything is OK and working.
Thanks a lot!