Forum Discussion
(Blank) on Card
I have created a measure to get the revenue of an activity. i.e Sum of [Amount] column filtered by a specific [Activity] and [Account Type]. In this case, account types is "Income" and "Other Income" for "Dairy" activity.
This is my DAX expression.
Revenue = CALCULATE(Sum(Transactions[Amount]),FILTER(Transactions, Transactions[Account Type]="Income" && Transactions[Activity]="Dairy" && Transactions[Account Type]="Other Income"))
Problem is when I try to visualize the result on a card. It returns (Blank). Why?
- Anonymous3 years ago
Hi,
Have you tried the below?
Revenue = CALCULATE(
Sum( Transactions[Amount]),
FILTER( Transactions,
Transactions[Account Type] IN {"Income", "Other Income"}
&& Transactions[Activity]="Dairy"
)
)
6 Replies
- ghoshabhijeet
Solution Supplier
Victorsam Thanks for your query. Please share some dummy data.
- VictorsamFrequent Visitor
Sure ghoshabhijeet .
See photo.
When I use the DAX Anonymous suggested though, I'm only getting sum for [Account Type]"Income"- AnonymousNot applicable
Hi,
I would then check if there are trailing spaces in the Activity and Account Type columns. Any spaces or typos would prevent effective filtering.
- AnonymousNot applicable
Hi,
Have you tried the below?
Revenue = CALCULATE(
Sum( Transactions[Amount]),
FILTER( Transactions,
Transactions[Account Type] IN {"Income", "Other Income"}
&& Transactions[Activity]="Dairy"
)
)- VictorsamFrequent Visitor
Hi Anonymous ,
Thanks for this. The card no longer shows (Blank).
However, for example, in 2020, the card shows 306,772,172/= as the result. When I check my table, that sum is from [Account Type]"Income" only.Here is a snapshot of my data.