The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi All,
I have couple of Fact and dimension table and trying to query the measure from Fact Table along with few columns from Dimension table but query take long time . Can someone please help
Fact:
ProductId
ProductCountLocal -- this is Count measure on SalesId with IsLocal =="Yes"
IsLocal
Dimension
ProductId
ProductName
ProductLocation
DAX Code
EVALUATE
SELECTCOLUMNS (
SUMMARIZECOLUMNS (
Fact[ProductId],
Dimension[ProductName],
Dimension[ProductLocation]
"ProductCount",Fact[ProductCountLocal],
),
"ProductId",Fact[ProductId],
"ProductName", Dimension[ProductName],
"ProductLocation", Dimension[ProductLocation],
"ProductCount", [ProductCount]
)
Thanks,
Abhiram
@abhiram342 , is this not work alone?
SELECTCOLUMNS (
Fact[ProductId],
Dimension[ProductName],
Dimension[ProductLocation]
"ProductCount",Fact[ProductCountLocal],
)
User | Count |
---|---|
14 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
19 | |
13 | |
8 | |
5 |