Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 to get $35 for each Invoice No and displaying values ($35) for any rows.
Invoice No | Invoice Date | SKU | Invoice | What I want |
1001 | 7/12/2022 | a123 | $250 | $35 |
1001 | 7/12/2022 | b123 | $100 | |
1001 | 7/12/2022 | c123 | $10 | |
1002 | 6/6/2023 | z123 | $2 | $35 |
1002 | 6/6/2023 | y123 | $4 | |
1023 | 1/4/2023 | k123 | $1 | $35 |
1023 | 1/4/2023 | v123 | $1,00 | |
1023 | 1/4/2023 | s123 | $5 |
Solved! Go to Solution.
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)
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)
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)
Thanks, @Ahmedx for your time. I think DAX you share is for the calculated column. I'm looking for a DAX measure to manage this.
Hi @Kella
If i understood you correctly just add column with value you need an format it as currency:
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Thanks for your time but I need $35 to display for each Invoice No not for each row.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
95 | |
82 | |
71 | |
64 |
User | Count |
---|---|
115 | |
105 | |
95 | |
79 | |
72 |