Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Victorsam
Frequent Visitor

(Blank) on Card

My 'Transactions' table has the following columns; [Account Type], [Account Group], [Account Name], [Year], [Amount], and [Activity].
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?
 
1 ACCEPTED SOLUTION
Ada_nnaya
Frequent Visitor

Hi, 

Have you tried the below?
Revenue = CALCULATE(
                         Sum( Transactions[Amount]),
                                  FILTERTransactions
                                          Transactions[Account Type] IN {"Income", "Other Income"}
                                           && Transactions[Activity]="Dairy" 
                                    )
                            )

View solution in original post

6 REPLIES 6
Ada_nnaya
Frequent Visitor

Hi, 

Have you tried the below?
Revenue = CALCULATE(
                         Sum( Transactions[Amount]),
                                  FILTERTransactions
                                          Transactions[Account Type] IN {"Income", "Other Income"}
                                           && Transactions[Activity]="Dairy" 
                                    )
                            )

Hi @Ada_nnaya ,
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.
Dummy Data.png

ghoshabhijeet
Solution Supplier
Solution Supplier

@Victorsam  Thanks for your query. Please share some dummy data.

Sure @ghoshabhijeet .
See photo.
When I use the DAX @Ada_nnaya suggested though, I'm only getting sum for [Account Type]"Income"

 

Dummy Data.png

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.

Hi @Ada_nnaya 

Thank you so much. It's working now. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.