Forum Discussion
Filtering data visual when slicer selected
- Anonymous2 years ago
Hi blader1989,
After I replace the max to values function and change the operator to 'in' , the visual seems works well with filter selection. You can try to use following measure formula if help:
L3M2 = CALCULATE ( SUM ( raw[Total (-VAT)] ), FILTER ( ALL ( 'raw' ), raw[Billing Date] IN VALUES ( IndependentCalendartbl[Date] ) && raw[Billing Date] <= MAX ( Calendartbl[Date] ) && raw[Billing Date] >= EDATE ( MAX ( Calendartbl[Date] ), -3 ) ) )Notice:
The max function only extracts the single value from aggregate row contents. So it may get the blank result(power bi visuals will auto hide the category that has blank result) if your table records not existed correspond records with date equal to the end date of each category year month group.
Regards,
Xiaoxin Sheng
Hi Anonymous , thank you for your reply. I already created a new unconnected date table for my purpose in my PBIX file
So could you please guide me step by step as your comment? Thank you.
Hi blader1989,
After I replace the max to values function and change the operator to 'in' , the visual seems works well with filter selection. You can try to use following measure formula if help:
L3M2 =
CALCULATE (
SUM ( raw[Total (-VAT)] ),
FILTER (
ALL ( 'raw' ),
raw[Billing Date]
IN VALUES ( IndependentCalendartbl[Date] )
&& raw[Billing Date] <= MAX ( Calendartbl[Date] )
&& raw[Billing Date] >= EDATE ( MAX ( Calendartbl[Date] ), -3 )
)
)
Notice:
The max function only extracts the single value from aggregate row contents. So it may get the blank result(power bi visuals will auto hide the category that has blank result) if your table records not existed correspond records with date equal to the end date of each category year month group.
Regards,
Xiaoxin Sheng
- blader19892 years agoHelper II
Thank you Anonymous for your wonderful reply. It solved my problem.