Forum Discussion
Kella
3 years agoFrequent Visitor
DAX Measure - To get only one value for multiple rows
I am new to Power BI, I am facing issue where I want to create a new column based on the Invoice Date and the Invoice No. In below table, I want to calculate "What I want" column using DAX measure ...
- 3 years ago
pls try this
sum Invoice = SUM('Table'[Invoice]) ----- 35 in Invoice = VAR _t1 = SELECTEDVALUE('Table'[Invoice No]) VAR _t2 = SELECTEDVALUE('Table'[Invoice Date]) VAR _tbl = FILTER(ALL('Table'),'Table'[Invoice No]=_t1&&'Table'[Invoice Date]=_t2) VAR Results= RANKX(_tbl,[sum Invoice],,DESC) RETURN IF(Results =1,35)
Ahmedx
3 years agoSuper User
pls try this
Column =
VAR _t1 = [Invoice No]
VAR _t2 = [Invoice Date]
VAR _tbl = FILTER(ALL('Table'),[Invoice No]=_t1&&[Invoice Date]=_t2)
VAR Results= RANKX(_tbl,[Invoice],,DESC)
RETURN
IF(Results =1,35)