The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
We have single fact table with join on two different dates and there are multiple measures aggregated based on these two different dates. Time table is joined with Demand fact table on NeedDate and SchedDate. I have imported the data and did the modeling, where requirement for one of the measure is to get the MAX of QTY by ORDER ID column. Here the challenge is how can I make sure the QTY and the ORDER ID columns to use the NeedDate relationship before performing the MAX of QTY by ORDER ID?
USERRELATIONSHIP function require CALCULATE function in order to get the relationship to work, not sure how can we bring the relationship join for ORDER ID?
MAX of QTY by ORDER ID DAX calculated measure calculation I have as shown below?
sumx(values(Table[ORDER ID]), calculate(max(Demand[QTY])))
But I need to get the ORDER ID and QTY based on NeedDate join. How can I achieve this?
Can we get this done using DAX?
Thanks & Regards,
Abdul
Solved! Go to Solution.
@AbdulAzad , Assume SchedDate is inactive
sumx(values(Table[ORDER ID]), calculate(max(Demand[QTY]), USERRELATIONSHIP (Date[date],Demand[SchedDate] )))
also refer
@AbdulAzad , Assume SchedDate is inactive
sumx(values(Table[ORDER ID]), calculate(max(Demand[QTY]), USERRELATIONSHIP (Date[date],Demand[SchedDate] )))
also refer
Hi Amit,
Thank you for your quick and awesome reply. You mean to say the calculate part in sumx function if it refers to a specific table join then the corresponding ORDER ID values also will be picked from calculate part join.
Thanks & Regards,
Abdul
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
108 | |
82 | |
77 | |
46 | |
39 |
User | Count |
---|---|
137 | |
108 | |
69 | |
64 | |
53 |