Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi there, I am stuck on creating a measure based on a column where I have to output the sum of that column whether it includes or not includes certain charachters.
For example say that some of the rows in this column say 12345-NR, but some other rows in that same column just say 12345.
How can I get the sum of the rows in that column that include rows only when it ends in "NR" on a seperate measure, and another seperate measure that sums the same column only when the rows do not contain "NR" at the end.
This is the measure (incorrect) i have created when it includes NR:
Solved! Go to Solution.
@Anonymous
no NR= CALCULATE(SUM(Backlog[Remain Cdn Ttl Price]), FILTER(Backlog, RIGHT(Backlog[Project ID],2) <> "NR"))
only NR= CALCULATE(SUM(Backlog[Remain Cdn Ttl Price]), FILTER(Backlog, RIGHT(Backlog[Project ID],2) = "NR"))
/if NR is contained anywhere in the string
no NR= CALCULATE(SUM(Backlog[Remain Cdn Ttl Price]), FILTER(Backlog, CONTAINSSTRING('Table'[Column1],"NR") =FALSE()))
only NR= CALCULATE(SUM(Backlog[Remain Cdn Ttl Price]), FILTER(Backlog, CONTAINSSTRING('Table'[Column1],"NR") =TRUE()))
@Anonymous
no NR= CALCULATE(SUM(Backlog[Remain Cdn Ttl Price]), FILTER(Backlog, RIGHT(Backlog[Project ID],2) <> "NR"))
only NR= CALCULATE(SUM(Backlog[Remain Cdn Ttl Price]), FILTER(Backlog, RIGHT(Backlog[Project ID],2) = "NR"))
/if NR is contained anywhere in the string
no NR= CALCULATE(SUM(Backlog[Remain Cdn Ttl Price]), FILTER(Backlog, CONTAINSSTRING('Table'[Column1],"NR") =FALSE()))
only NR= CALCULATE(SUM(Backlog[Remain Cdn Ttl Price]), FILTER(Backlog, CONTAINSSTRING('Table'[Column1],"NR") =TRUE()))
@smpa01 how are you saying "it does not contain"? I thought using "<>" meant contains
Thanks so much !
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
85 | |
82 | |
69 | |
49 |
User | Count |
---|---|
143 | |
123 | |
107 | |
61 | |
55 |