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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Simple addition give wrong result

Hi,
I'm counting number of unique IDs per month in given timeframe and I've ancountered two strange things: 1. Looking for the same thing but using two different approaches (value for each month and cumulative value month by month) gives different values. See screenshot below. 2. When You'll add by hand values in first column (monthly value) the result is 868, when PowerBI summerize it - it's 864 o_O

any ideas?

 

snip_20171012145926.jpg

DAX Formulas below:

Y-1 Kandydaci = CALCULATE(
    distinctcount(getDataForTeb[ID_DANE_OSOBOWE]);
    DATESBETWEEN(
        getDataForTeb[Złożenie podania];
        DATE(YEAR(now())-1;4;1);
        IF(DATE(YEAR(NOW())-1;MONTH(NOW());DAY(NOW()))<=DATE(YEAR(NOW())-1;11;30);
            DATE(YEAR(NOW())-1;MONTH(NOW());DAY(NOW()));DATE(YEAR(NOW())-1;11;30)));
            ISBLANK(getDataForTeb[REZYGNACJA_DATA]))

Y-1 Kandydaci cumulative = CALCULATE(
    DISTINCTCOUNT(getDataForTeb[ID_DANE_OSOBOWE]);
    FILTER(
        ALL (getDataForTeb);
        AND (
            getDataForTeb[Złożenie podania] <= MAX(getDataForTeb[Złożenie podania])-364;
            AND (
                getDataForTeb[Złożenie podania] <= DATE(YEAR(NOW())-1; 11; 30);
                getDataForTeb[Złożenie podania] >= DATE(YEAR(NOW())-1; 4; 1)
            )
        )
    );
    ISBLANK(getDataForTeb[REZYGNACJA_DATA])
)
Status: New
Comments
uzzy
New Member
v-qiuyu-msft
Community Support

Hi @uzzy,

 

Would you please share the your PBIX file if possible? 

 

Best Regards,
Qiuyun Yu 

uzzy
New Member

Unfortunately I cannot share PBIX file, there are confidential data.

uzzy
New Member

It's getting more strange then this...

No DAX in this file, just started to add slicers to count something fast 😞

snip_20171016144115.png

 

Can someone explain?