This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
I am trying to filter one date off of another. I need to determine how many people were given both rx1 & rx2 in the same month, using rx2_date as a slicer. Here is some sample data:
I attempted to create a measure based on another post:
Solved! Go to Solution.
Hi @IDepi22 ,
Please check this measure:
Measure =
CALCULATE (
COUNT ( 'Table'[id] ),
FILTER (
ALLSELECTED ( 'Table' ),
YEAR ( 'Table'[rx1_date] ) = YEAR ( 'Table'[rx2_date] )
&& MONTH ( 'Table'[rx1_date] ) = MONTH ( 'Table'[rx2_date] )
)
)
Best Regards,
Jay
Hi @IDepi22 ,
Please check this measure:
Measure =
CALCULATE (
COUNT ( 'Table'[id] ),
FILTER (
ALLSELECTED ( 'Table' ),
YEAR ( 'Table'[rx1_date] ) = YEAR ( 'Table'[rx2_date] )
&& MONTH ( 'Table'[rx1_date] ) = MONTH ( 'Table'[rx2_date] )
)
)
Best Regards,
Jay
Thank you for your help! This worked, but I made one adjustment. When I included "ALLSELECTED" in front of the table name, I got the same number for each age and gender breakdown. When I removed that, I was able to break down the total by age and gender.
Hi,
Share the link from where i can download your PBI file.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 49 | |
| 47 | |
| 41 | |
| 21 | |
| 19 |