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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Shrujan1612
Helper I
Helper I

my measure is giving wrong total value in table visual

CS Mix measure is giving total as zero in table, so i have created CS Mix Summ for total value but that is giving wrong total and row level values as zero, can anyone help me with this issue?

 

CS Mix =

 

VAR Curr_month =

        CALCULATE (

            [CS Cont] ,

            DATESBETWEEN (

                'Calendar'[Calendar date],

                [PeriodStart],

                [PeriodEnd]

            )

        )

VAR Pre_month =

        CALCULATE (

            [CS Cont],

            DATESBETWEEN ( 'Calendar'[Calendar date], [PriorPeriodStart], [PriorPeriodEnd] )

        )

   

VAR Pre_month_CS =

    CALCULATE (

        [Value per CS],

        DATESBETWEEN (

            'Calendar'[Calendar date],

            [PriorPeriodStart],

            [PriorPeriodEnd]

        )

    )

VAR Total_Pre_month_CS =

    CALCULATE (

        [Value per CS],

        ALLSELECTED (),

        DATESBETWEEN ( 'Calendar'[Calendar date], [PriorPeriodStart], [PriorPeriodEnd] )

    )

 

VAR Total_Curr_stock =

    CALCULATE (

        [Total Stock],

        ALLSELECTED (),

        DATESBETWEEN ( 'Calendar'[Calendar date], [PeriodStart], [PeriodEnd] )

    )

 

VAR Total =

    IF (

        ISBLANK ( ( Curr_month - Pre_month ) * Total_Curr_stock * ( Pre_month_CS - Total_Pre_month_CS ) ),

        0,

        ( Curr_month - Pre_month ) * Total_Curr_stock * ( Pre_month_CS - Total_Pre_month_CS )

    )

 

RETURN Total

 

CS Mix Summ =

 VAR A2 = ADDCOLUMNS(

                    SUMMARIZE('Inventory Balance','Inventory Balance'[PlantID],'Inventory Balance'[ProductId]),

                       "CSMixImpact", CALCULATE([CS Mix] ))

Return SUMX(A2, [CSMixImpact])

 

CS MIX Impact = [CS Mix] + [CS Mix Summ]

 

Shrujan1612_0-1703082727540.png

 

Thanks in advance

 

 

 

 

 

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors