Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
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.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 48 | |
| 35 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 142 | |
| 111 | |
| 65 | |
| 38 | |
| 33 |