Forum Discussion
memoalkatib1
3 years agoFrequent Visitor
RANKx
I have a live connection to a "locked" dataset that sits on top of a SSAS model. so I can only create measures. I have a table that has a bunch of columns including CustomerID , ProductID and Date Pu...
- 3 years ago
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
Rank measure: = IF ( HASONEVALUE ( Data[CustomerID] ) && HASONEVALUE ( Data[ProductID] ), CALCULATE ( COUNTROWS ( SUMMARIZE ( Data, Data[CustomerID], Data[ProductID], Data[Date Purchased] ) ), WINDOW ( 1, ABS, 0, REL, SUMMARIZE ( ALL ( Data ), Data[CustomerID], Data[ProductID], Data[Date Purchased] ), ORDERBY ( Data[Date Purchased], DESC ), KEEP, PARTITIONBY ( Data[CustomerID], Data[ProductID] ) ) ) )
Jihwan_Kim
3 years agoSuper User
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
Rank measure: =
IF (
HASONEVALUE ( Data[CustomerID] ) && HASONEVALUE ( Data[ProductID] ),
CALCULATE (
COUNTROWS (
SUMMARIZE ( Data, Data[CustomerID], Data[ProductID], Data[Date Purchased] )
),
WINDOW (
1,
ABS,
0,
REL,
SUMMARIZE (
ALL ( Data ),
Data[CustomerID],
Data[ProductID],
Data[Date Purchased]
),
ORDERBY ( Data[Date Purchased], DESC ),
KEEP,
PARTITIONBY ( Data[CustomerID], Data[ProductID] )
)
)
)
Anonymous
2 years agoNot applicable
I Have same scenario,
I am trying to use this solution
When i tried this i am getting all values in the measure as 1
how can i get correct values