Forum Discussion
Anonymous
1 year agoNot applicable
Column with data type issue
Hi , I am trying to create one calculated column Calculated amount. I have a flag column of A and B records, If I select A from slicer it should give sum(Amount), if I select B it should should NA...
Bibiano_Geraldo
Super User
1 year agoHi Anonymous ,
First create a measure for calculated Amount by the code:
Calculated Amount =
IF (
SELECTEDVALUE('YourTable'[Flag]) = "A",
SUM('YourTable'[Amount]),
BLANK()
)
And then create a measure to handle "NA" for Flag B by the code:
Display Amount =
IF (
SELECTEDVALUE('YourTable'[Flag]) = "B",
"NA",
[Calculated Amount]
)
This approach ensures that the measure responds dynamically to the slicer selection and that "NA" displays only when "B" is selected. Let me know if you run into any issues with this!
If this help you, please give a kudo and mark as solution
Anonymous
1 year agoNot applicable
Can we show Sum(Calculated Amount) as a summarized amount in card and also table visual . For example in below visual it's not showing summarized amount at bottom when nothing is selected
and in card also it's giving blank when nothing is selected , I want to see sum(calculated amount) when nothing is selected
Plaese reply back
Thanks