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

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.

Reply
Syndicate_Admin
Administrator
Administrator

Segmentation with DAX

Good morning, everyone.

I'm creating a dashboard, which requires me to segment by Budget and Revenue, when budget is less than 100% and Revenue less than or equal to zero. For this, I have created an internal table with the word Budget and Revenue

amgalvisr_0-1625148106437.png

and I need to filter a grid with only the data that meets the condition when selecting either of the two.

I tried with a simple measure:

KPI Fail Measure = IF('KPI'[KPI selected]= "Budget", CALCULATETABLE(PROFIT, FILTER(PROFIT,PROFIT[Column1.BudgetCompl]<0)), CALCULATETABLE(PROFIT, FILTER(PROFIT,PROFIT[Column1.Revenue]<= 0))) however, I get an error that says that multiple columns cannot be converted to a scalar value
If anyone can help me, I would be very grateful. Happy day.

3 REPLIES 3
Anonymous
Not applicable

Hi  @Syndicate_Admin ,

You can modify Dax to the following:

KPI Fail Measure =
IF (
    'KPI'[KPI selected] = "Budget",
    SUMX (
        CALCULATETABLE ( ' PROFIT ', ' PROFIT '[Column1.BudgetCompl] <= 0 ),
        [Column to be calculated]
    ),
    SUMX (
        CALCULATETABLE ( ' PROFIT ', ' PROFIT '[Column1.Revenue] <= 0 ),
        [Column to be calculated]
    )
)

If the result does not meet your expectations, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@Syndicate_Admin ,

 

KPI Fail Measure = IF(selectedvalue('KPI'[KPI selected])= "Budget", CALCULATETABLE(PROFIT, FILTER(PROFIT,PROFIT[Column1.BudgetCompl]<0)), CALCULATETABLE(PROFIT, FILTER(PROFIT,PROFIT[Column1.Revenue]<= 0)))

 

or

 

KPI Fail Measure = IF(max('KPI'[KPI selected])= "Budget", CALCULATETABLE(PROFIT, FILTER(PROFIT,PROFIT[Column1.BudgetCompl]<0)), CALCULATETABLE(PROFIT, FILTER(PROFIT,PROFIT[Column1.Revenue]<= 0)))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for trying, however the same error still came out.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.