Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Community members,
I am a newbie in DAX and trying out following DAX to create a temp table.
As per the model, the Date table has a relationship with Sales table. Not sure why then, Related function isnt working.
One can refer the pbix on which i am working to this link
https://drive.google.com/file/d/1a7E6ZCmFPciuYG3CDH8tzMQDPim3toLO/view?usp=share_link
Thank you so much for your time in trying to help here.
Cheers
ARU
Solved! Go to Solution.
Not 100% sure why RELATED doesn't work with ADDCOLUMNS, but you can achieve the same thing with
ADDCOLUMNS(
SUMMARIZE( 'Sales', 'Sales'[OrderDateKey], 'Date'[Date] ),
"sales", [Sales Amount]
)
When using SUMMARIZE you can group by any column from the expanded table.
Not 100% sure why RELATED doesn't work with ADDCOLUMNS, but you can achieve the same thing with
ADDCOLUMNS(
SUMMARIZE( 'Sales', 'Sales'[OrderDateKey], 'Date'[Date] ),
"sales", [Sales Amount]
)
When using SUMMARIZE you can group by any column from the expanded table.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |