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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ARVINDlsllp
Frequent Visitor

Total are correct of measures

Hello Everyone,

Can you please help with my measure i.e. 

IF(ISFILTERED(Append1[REGIME]),
CALCULATE(DISTINCTCOUNT(Append1[REF]),FILTER(Append1,Append1[Flag]="B"))
+CALCULATE(DISTINCTCOUNT(Append1[REF]),FILTER(Append1,Append1[Flag]="C")),
CALCULATE(DISTINCTCOUNT(Append1[REF]),SEARCH("C*",Append1[REGIME],1,0),FILTER(Append1,Append1[Flag]="B"))+CALCULATE(DISTINCTCOUNT(Append1[REF]),Append1[Flag]="C"))
 
totals are not correct but while export in excel of the visual values total different from powerbi visual total.
 
5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @ARVINDlsllp,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I can't , its size is too large , I have also filtered top 20 with a column reference but some place above DAX is working fine   

ARVINDlsllp
Frequent Visitor

No, Its nots working

ARVINDlsllp
Frequent Visitor

Hello 

 

let me tell you the total of is not correct, i have exported data into excell the total is different in power bi matrix visual. how c=i can fix this?

 

 

v-shex-msft
Community Support
Community Support

HI @ARVINDlsllp,

It sounds like a common measure total level calculation issue that appears when your formula needs to calculate with multiple level aggregations, you can try to use following measure formula if it helps:

formula =
SUMX (
    SUMMARIZE (
        ALLSELECTED ( Append1 ),
        [REGIME],
        "DC_REF",
            IF (
                ISFILTERED ( Append1[REGIME] ),
                CALCULATE (
                    DISTINCTCOUNT ( Append1[REF] ),
                    FILTER ( Append1, Append1[Flag] = "B" )
                )
                    + CALCULATE (
                        DISTINCTCOUNT ( Append1[REF] ),
                        FILTER ( Append1, Append1[Flag] = "C" )
                    ),
                CALCULATE (
                    DISTINCTCOUNT ( Append1[REF] ),
                    SEARCH ( "C*", Append1[REGIME], 1, 0 ),
                    FILTER ( Append1, Append1[Flag] = "B" )
                )
                    + CALCULATE ( DISTINCTCOUNT ( Append1[REF] ), Append1[Flag] = "C" )
            )
    ),
    [DC_REF]
)

In addition, you can also take a look at Greg’s blog to know more about this issue:

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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