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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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