We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
Hi,
I'm getting unique values using Distinct to avoid duplicate list but can I add one conditon from its data table?
In the same table 'TOSS serivce PO_master - Append', there's another column 'Contract Amount' and I wanna take out which has value 0.
Solved! Go to Solution.
Hi @jeongkim
Can you please try the below DAX?
VAR FilteredTable = FILTER(
'TOSS service PO_master - Append',
'TOSS service PO_master - Append'[Contract Amount] <> 0
)
RETURN DISTINCT(SELECTCOLUMNS(FilteredTable, "Service No", 'TOSS service PO_master - Append'[service no]))
If this answers your questions, kindly accept it as a solution.
If you found this helpful, then give kudos.
Hi @jeongkim
As i have tried with sample dataset
Dataset
Service No.Contract Amount
| ||||||||||||||||||||||||||
I have written the same DAX, and it return the result |
Hi @jeongkim
Can you please try the below DAX?
VAR FilteredTable = FILTER(
'TOSS service PO_master - Append',
'TOSS service PO_master - Append'[Contract Amount] <> 0
)
RETURN DISTINCT(SELECTCOLUMNS(FilteredTable, "Service No", 'TOSS service PO_master - Append'[service no]))
If this answers your questions, kindly accept it as a solution.
If you found this helpful, then give kudos.
It works thanks!
Can we create Contract Amount column with your code?
Lookupvalue dax not working cuz it only get 1 First or Last value but I wanna get Sum of 'Contract Amount' from 'TOSS service PO_master - Append' table into current Distinct table using same 'Service No.'
Hi @jeongkim
Can you please try this?
VAR FilteredTable =
FILTER(
'TOSS service PO_master - Append',
'TOSS service PO_master - Append'[Contract Amount] <> 0
)
RETURN
ADDCOLUMNS(
DISTINCT(SELECTCOLUMNS(FilteredTable, "Service No", 'TOSS service PO_master - Append'[service no])),
"Total Contract Amount",
CALCULATE(
SUM('TOSS service PO_master - Append'[Contract Amount]),
ALLEXCEPT('TOSS service PO_master - Append', 'TOSS service PO_master - Append'[service no])
)
)
If this answers your questions, kindly accept it as a solution.
If you found this helpful, then give kudos.
Can you please take a look the error?
Hi @jeongkim
As i have tried with sample dataset
Dataset
Service No.Contract Amount
| ||||||||||||||||||||||||||
I have written the same DAX, and it return the result |
oh this creating 2 columns in one go, right?
Now it seems working great
Yes
If I answer your questions, kindly accept it as a solution
If this is helpful then give kudos.
User | Count |
---|---|
67 | |
61 | |
47 | |
35 | |
32 |
User | Count |
---|---|
87 | |
72 | |
57 | |
51 | |
45 |