cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Raghu_1753
Frequent Visitor

Underlying data for card visual showing mismatch in the data

When I'm tyring to export underlying data for a Card visual where i used a measurre to have a value to the card visual. But, when I do the same thing with Table chart it gave the correct results.

 

PBI REPORT.PNG

 

EXPORTED DATA.PNG

 

 

The measure which i've used to calculate value to card visual as follows:

Count Accuracy=
    VAR DIFF=ABS(SUM('MAXIMO INVTRANS'[PHYSCNT])-SUM('MAXIMO INVTRANS'[CURBAL]))
    VAR CURSUM=SUM('MAXIMO INVTRANS'[CURBAL])
    VAR DIV=DIFF/CURSUM
    RETURN
        IF(ISBLANK(CURSUM),BLANK(),IF(AND(CURSUM<>BLANK(),CURSUM>0),DIV,0))
 
Anyone please help me to find the solution.
1 ACCEPTED SOLUTION

Thanks for your reply, It really helped me a lot. but, I did minor change in your measure then, it works for me. When I go with yours the Count Accuracy values are summing up for all the records and giving me the final result. So, I modified and it's working now. 

 

What I used is:

 

  Count Accuracy =       
            IF (
                ISBLANK ( SUM ( 'MAXIMO INVTRANS'[CURBAL] ) ),
                BLANK (),
                IF (
                    AND (
                        SUM ( 'MAXIMO INVTRANS'[CURBAL] ) <> BLANK (),
                        SUM ( 'MAXIMO INVTRANS'[CURBAL] ) > 0
                    ),
                    DIVIDE (
                        ABS ( SUM ( 'MAXIMO INVTRANS'[PHYSCNT] ) - SUM ( 'MAXIMO INVTRANS'[CURBAL] ) ),
                        SUM ( 'MAXIMO INVTRANS'[CURBAL] )
                    ),
                    0
                )
            )
    
)

View solution in original post

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @Raghu_1753 ,

 

Please try the following measure.

Count Accuracy =
SUMX (
    SUMMARIZE (
        'Table',
        'Table'[TRANSDATE],
        "MEASURE",
            IF (
                ISBLANK ( SUM ( 'MAXIMO INVTRANS'[CURBAL] ) ),
                BLANK (),
                IF (
                    AND (
                        SUM ( 'MAXIMO INVTRANS'[CURBAL] ) <> BLANK (),
                        SUM ( 'MAXIMO INVTRANS'[CURBAL] ) > 0
                    ),
                    DIVIDE (
                        ABS ( SUM ( 'MAXIMO INVTRANS'[PHYSCNT] ) - SUM ( 'MAXIMO INVTRANS'[CURBAL] ) ),
                        SUM ( 'MAXIMO INVTRANS'[CURBAL] )
                    ),
                    0
                )
            )
    ),
    [MEASURE]
)

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

 

Thanks for your reply, It really helped me a lot. but, I did minor change in your measure then, it works for me. When I go with yours the Count Accuracy values are summing up for all the records and giving me the final result. So, I modified and it's working now. 

 

What I used is:

 

  Count Accuracy =       
            IF (
                ISBLANK ( SUM ( 'MAXIMO INVTRANS'[CURBAL] ) ),
                BLANK (),
                IF (
                    AND (
                        SUM ( 'MAXIMO INVTRANS'[CURBAL] ) <> BLANK (),
                        SUM ( 'MAXIMO INVTRANS'[CURBAL] ) > 0
                    ),
                    DIVIDE (
                        ABS ( SUM ( 'MAXIMO INVTRANS'[PHYSCNT] ) - SUM ( 'MAXIMO INVTRANS'[CURBAL] ) ),
                        SUM ( 'MAXIMO INVTRANS'[CURBAL] )
                    ),
                    0
                )
            )
    
)

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors