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 August 31st. Request your voucher.
Hi, I have a customer dimension structured like the below
I have a FACT table like the below (joined using CustomerKey)
I want to add a column to my customer dimension table which gets me the latest Product Name, and Order Date from the FACT table where OrderComplete = 0. It should get me the one that has the latest Order date...So this would give me an output of the below
How could I build this calculated column using DAX?
Thanks
Solved! Go to Solution.
LatestProductName =
MAXX(
TOPN(
1,
FILTER( RELATEDTABLE( 'FACT' ), 'FACT'[OrderComplete] = 0 ),
'FACT'[OrderDate]
),
'FACT'[ProductName]
)
LatestProductDate =
CALCULATE( LASTDATE( 'FACT'[OrderDate] ), 'FACT'[OrderComplete] = 0 )
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
LatestProductName =
MAXX(
TOPN(
1,
FILTER( RELATEDTABLE( 'FACT' ), 'FACT'[OrderComplete] = 0 ),
'FACT'[OrderDate]
),
'FACT'[ProductName]
)
LatestProductDate =
CALCULATE( LASTDATE( 'FACT'[OrderDate] ), 'FACT'[OrderComplete] = 0 )
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Hi,
try creating a these measures:
User | Count |
---|---|
80 | |
73 | |
39 | |
30 | |
28 |
User | Count |
---|---|
107 | |
99 | |
55 | |
49 | |
46 |