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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
PietroFarias
Resolver II
Resolver II

Two Date in Measure

I've a table with a columns date and other the price. I need create two measure, one measure return the SUM from slicer selected with column date and the other measure the SUM from other slicer with same column date. How can i do this?

1 ACCEPTED SOLUTION
PietroFarias
Resolver II
Resolver II

I'm learning DAX. What I did was create two table with same Date: Date_1 and Date_2. After i created a relationship from DATE_1 to main table, and from DATE_2 to main table. Disable the relationships and i used USERELATIONSHIP.

Measures created:

Value 1: CALCULATE([measure], USERELATIONSHIP(DATE_1[DATE], GOODS[UPDATE]) )

Value 2: CALCULATE([measure], USERELATIONSHIP(DATE_2[DATE], GOODS[UPDATE]) )

View solution in original post

3 REPLIES 3
PietroFarias
Resolver II
Resolver II

I'm learning DAX. What I did was create two table with same Date: Date_1 and Date_2. After i created a relationship from DATE_1 to main table, and from DATE_2 to main table. Disable the relationships and i used USERELATIONSHIP.

Measures created:

Value 1: CALCULATE([measure], USERELATIONSHIP(DATE_1[DATE], GOODS[UPDATE]) )

Value 2: CALCULATE([measure], USERELATIONSHIP(DATE_2[DATE], GOODS[UPDATE]) )
mwegener
Most Valuable Professional
Most Valuable Professional

You are thinking on something like this?

PBIX

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


mustafaasiroglu
Microsoft Employee
Microsoft Employee

If your two measures will be used in separate visuals, only one measure and one date column seems enough for your scenario. All needed is using edit interaction to specify which slicer will affect which visual.

If you need both measure to be in same visual, then easiest approach can be creating a second date table clone using dax, and making each measure formulas something like =Calculate(sum amount, filter (datatable, date = SelectedValue(date1[date])) so different measures will use different date filters.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.