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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
AshishKS
Frequent Visitor

I need to supress the rows where the column sub-total has no value.

The show items with No data works, if I have not formatted the Amounts in my columns, but once I format it using DAX, this option doesn't work anymore.

This one is w/o formatting the amount column

AshishKS_0-1734646654172.png

 

This one is after formatting the Amount Columns(Month-Year)

AshishKS_1-1734646905673.png

 

My DAX for Visual 2 - What can I add here to suppress rows which have no data in the month columns!

Actuals =
VAR _selectedHeader = SELECTEDVALUE ('a360_finance fin_PnL_Template2'[Level_1])
VAR _Actuals = FORMAT([Actual Amount],"#,##0.00;(#,##0.00)")
VAR _IsLevel2Visible = ISINSCOPE('a360_finance fin_PnL_Template2'[Level_2])
VAR _DisplayDetailCode = SELECTEDVALUE('a360_finance fin_PnL_Template2'[Highlight])

VAR _Revenue = CALCULATE([Actual Amount],
                               REMOVEFILTERS('a360_finance fin_PnL_Template2'),
                               'a360_finance fin_PnL_Template2'[Level_1] IN {"Sales Revenue"}
                               )
VAR _COGS = CALCULATE([Actual Amount],
                               REMOVEFILTERS('a360_finance fin_PnL_Template2'),
                               'a360_finance fin_PnL_Template2'[Level_1] IN {"Cost of Products Sold"}
                               )

VAR _CM = CALCULATE([Actual Amount],
                               REMOVEFILTERS('a360_finance fin_PnL_Template2'),
                               'a360_finance fin_PnL_Template2'[Level_1] IN {"Sales Revenue","Cost of Products Sold"}
                               )
VAR _OCGS = CALCULATE([Actual Amount],
                               REMOVEFILTERS('a360_finance fin_PnL_Template2'),
                               'a360_finance fin_PnL_Template2'[Level_1] IN {"Other COGS"}
                               )
VAR _SGA = CALCULATE([Actual Amount],
                               REMOVEFILTERS('a360_finance fin_PnL_Template2'),
                               'a360_finance fin_PnL_Template2'[Level_1] IN {"SGA"}
                                )
VAR _NOPEXP = CALCULATE([Actual Amount],
                               REMOVEFILTERS('a360_finance fin_PnL_Template2'),
                               'a360_finance fin_PnL_Template2'[Level_1] IN {"Non Operating"}
                                )



VAR _Results = SWITCH(TRUE(),
_IsLevel2Visible = TRUE() && _DisplayDetailCode = 1, Blank(),
_selectedHeader = "Revenue", FORMAT(_Revenue, "#,##0.00;(#,##0.00)"),
_selectedHeader = "Cost of  Goods Sold", FORMAT(_COGS,"#,##0.00;(#,##0.00)"),
_selectedHeader = "Contribution Margin",  FORMAT(_CM,"#,##0.00;(#,##0.00)"),
_selectedHeader = "Contribution Margin Percentage", FORMAT((_CM/_Revenue), "#0.0%;(#0.0%)"),
_selectedHeader = "Other Cost of Goods Sold", FORMAT(_OCGS,"#,##0.00;(#,##0.00)"),
_selectedHeader = "Total COGS", FORMAT(_COGS+_OCGS,"#,##0.00;(#,##0.00)"),
_selectedHeader = "Gross Profit", FORMAT(_Revenue+_COGS+_OCGS,"#,##0.00;(#,##0.00)"),
_selectedHeader = "Gross Profit Percentage", FORMAT((_Revenue+_COGS+_OCGS)/_Revenue,"#0.0%;(#0.0%)"),
_selectedHeader = "Total SGA", FORMAT(_SGA,"#,##0.00;(#,##0.00)"),
_selectedHeader = "Total Operating Expenses", FORMAT(_SGA,"#,##0.00;(#,##0.00)"),
_selectedHeader = "Operating Income", FORMAT((_Revenue+_COGS+_OCGS+_SGA),"#,##0.00;(#,##0.00)"),
_selectedHeader = "Operating Income Percentage", FORMAT((_Revenue+_COGS+_OCGS+_SGA)/_Revenue,"#0.0%;(#0.0%)"),
_selectedHeader = "Total Non Operating", FORMAT(_NOPEXP,"#,##0.00;(#,##0.00)"),
_selectedHeader = "Net Income", FORMAT((_Revenue+_COGS+_OCGS+_SGA+_NOPEXP),"#,##0.00;(#,##0.00)"),
_Actuals
//FORMAT(_Actuals, "#,##0.00;(#,##0.00)")
)
Return _Results
1 REPLY 1
Anonymous
Not applicable

Hi @AshishKS ,

This is not possible, it means that both your column and row attributes will be gone. But the others are still populated with data, so it will be blank.

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.