March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hey there! I'm diving into DAX and trying to visualize the sales for the last 6 months. I've got this Date_Master table and made a copy named temp_date_master.. The relationship between the Date_Master and Temp_Date_Master was many-to-one. (The video explaining the process ). I have done the following measure
Last_6_Months_Sales =
var referenceDate = Max('Date Master'[Date])
var referenceDate1 = EOMONTH(referenceDate, -1)
var previousDates =
DATESINPERIOD('Temp_Date_Master'[Date],
referenceDate1 ,
-6,
MONTH
)
VAR Result =
CALCULATE(
[Sales Value],
REMOVEFILTERS('Date Master'),
KEEPFILTERS(previousDates),
USERELATIONSHIP('Date Master'[Date], 'Temp_Date_Master'[Date]))
Return
Result
I wanted to convert the relationship between the date_master and temp_date_master to be one-to-many relationship (I am trying it as im losing hierarchy of 'Date Master'[Date] as the column is the "many" side of a model relationship). How to solve this issue?
Solved! Go to Solution.
@ann_2024
If you madea copy of Date_Master and created Temp_Date_Master then the relationship should be one-to one. Not sure why you try to chage it to one-to-many
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@ann_2024
If you madea copy of Date_Master and created Temp_Date_Master then the relationship should be one-to one. Not sure why you try to chage it to one-to-many
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Fowmy Thanks for your suggestion. I have made the relationship one-to-one bidirectional and its working fine.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
18 | |
17 | |
7 | |
5 |
User | Count |
---|---|
31 | |
27 | |
19 | |
13 | |
12 |