Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi all,
I am using the following DAX measure to format the sum of sales & for some reason when I drop the measure in a visual a bunch of lines of data appear, any ideas on why that would happen/ how to fix it? Thanks!
Solved! Go to Solution.
Hmm. Does adding a blank check help at all?
Parent Annual Revenue =
VAR _1 =
CALCULATE ( SUM ( 'Sales Table'[Parent Annual Sales] ) )
VAR _2 =
SWITCH (
TRUE (),
ISBLANK ( _1 ), BLANK (),
VALUE ( _1 ) >= ( 10 ^ 8 ), FORMAT ( _1, "$#,0,,,.## B; ($#,0,,,.## B)" ),
VALUE ( _1 ) >= ( 10 ^ 5 ), FORMAT ( _1, "$#,0,,.## M; ($#,0,,.## M)" ),
VALUE ( _1 ) >= 1000, FORMAT ( _1, "$#,0,.## K; ($#,0,.## K)" ),
VALUE ( _1 ) < 1000, "-"
)
RETURN
_2
Can you explain what you mean by "a bunch of lines of data appear"? What are you seeing and what do you expect to see?
when I add this measure to a table visual with anyother metric (lets say company name) I get a list of all the company names. I expect to see only one value for the filtered company name
Hmm. Does adding a blank check help at all?
Parent Annual Revenue =
VAR _1 =
CALCULATE ( SUM ( 'Sales Table'[Parent Annual Sales] ) )
VAR _2 =
SWITCH (
TRUE (),
ISBLANK ( _1 ), BLANK (),
VALUE ( _1 ) >= ( 10 ^ 8 ), FORMAT ( _1, "$#,0,,,.## B; ($#,0,,,.## B)" ),
VALUE ( _1 ) >= ( 10 ^ 5 ), FORMAT ( _1, "$#,0,,.## M; ($#,0,,.## M)" ),
VALUE ( _1 ) >= 1000, FORMAT ( _1, "$#,0,.## K; ($#,0,.## K)" ),
VALUE ( _1 ) < 1000, "-"
)
RETURN
_2
Hi,
I am having the same issue of multiple rows appearing when I apply the FORMAT function to conditionally format a specific row in a matrix visual as percentage. I tried adding the blank check but it didn't fix the issue for me. The issue does no occur if I remove the FORMAT function.
This is my DAX measure that returns the correct number of rows in the matrix. It blows up the number of rows once I change the line highlighted in red to
Maybe try something like this:
Selected Measure =
VAR _maxline =
[...]
VAR _total = SUM ( 'ODS Net_Tuition'[Tuition_Billed] )
VAR _subtotal =
SWITCH (
TRUE (),
_maxline = 3 && NOT ISBLANK ( _subtotalTuitionRevenue ),
FORMAT ( _subtotalTuitionRevenue, "0.00" ),
_maxline = 4 && NOT ISBLANK ( _subtotalFinancialAid ),
FORMAT ( _subtotalFinancialAid * -1, "0.00" ),
_maxline = 5 && NOT ISBLANK ( _subtotalTuitionRevenue - _subtotalFinancialAid ),
FORMAT ( _subtotalTuitionRevenue - _subtotalFinancialAid, "0.00" ),
_maxline = 6 && NOT ISBLANK ( _percentDiscount ),
FORMAT ( _percentDiscount, "0.00%" ),
NOT ISBLANK ( _total ),
FORMAT ( _total, "0.00" )
)
RETURN
_subtotal
@AlexisOlson Thank you so much. That fixed my issue.
I added an alternate result to the DIVIDE function so that it returns 0 where the devisor was 0 otherwise those were being formatted as currency.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 21 | |
| 19 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 61 | |
| 52 | |
| 47 | |
| 40 | |
| 38 |