Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mostho
Helper II
Helper II

Right measure for a matrix visual

I have a table FT with 3 columns:
- DateA

- DateB

- Val
I have a matrix visual with DateB as Column, DateA as Row and sum of Val as values. works so far.

Now i wanna add a date slicer (with some given Dates e.g, from a disconnected table with one column DateC) which should filter the records from FT such that DateA > DateC and DateB < DateC

 

Example for FT:

DateADateBVal
20-01-202415-12-2023100
24-12-202307-12-2023200
25-01-202407-01-2024150
13-02-202420-11-2023180
23-12-202317-11-2023190


If I would select 31-12-2023 in the slicer the result should be:

 20-11-202307-01-2024Total
25-01-2024 150150
13-02-2024180 180
Total180150330


Additional Info: DateA and DateB are not unique. The combination of DateA and DateB also does not have to be unique.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mostho 

 

First of all, I need to confirm your requirements with you. According to the condition that DateA > DateC and DateB < DateC, the output image should not be 07-01-2024.

vxuxinyimsft_0-1723691864670.png

 

The following testing is for your reference.

vxuxinyimsft_1-1723691945281.png

 

Create a measure as follows

Measure = IF(SELECTEDVALUE('Table'[DateA]) > SELECTEDVALUE('DateC'[Date]) && SELECTEDVALUE('Table'[DateB]) < SELECTEDVALUE('DateC'[Date]), 1, 0)

 

Put the measure into the visual-level filters, set up show items when the value is 1.

vxuxinyimsft_2-1723692034748.png

 

Output:

vxuxinyimsft_3-1723692063616.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @mostho 

 

First of all, I need to confirm your requirements with you. According to the condition that DateA > DateC and DateB < DateC, the output image should not be 07-01-2024.

vxuxinyimsft_0-1723691864670.png

 

The following testing is for your reference.

vxuxinyimsft_1-1723691945281.png

 

Create a measure as follows

Measure = IF(SELECTEDVALUE('Table'[DateA]) > SELECTEDVALUE('DateC'[Date]) && SELECTEDVALUE('Table'[DateB]) < SELECTEDVALUE('DateC'[Date]), 1, 0)

 

Put the measure into the visual-level filters, set up show items when the value is 1.

vxuxinyimsft_2-1723692034748.png

 

Output:

vxuxinyimsft_3-1723692063616.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymousyes, youre right, i had the wrong record in the result.

thank you very much for the solution, i was very close but now i know, what my problem of understanding was.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.