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.

Reply
SebSchoon1
Post Patron
Post Patron

Measure provide wrong result

Hello all,

 

I have a strange behavior I do not understand,

 

I make multiple measures which are giving me the expected values

 

But then i want to use this result to a final step and it does not work..

 

Here's my report with information

SebSchoon1_2-1663583015267.png

 

 

I say,

 

If [Rank Pour Dispatch] <= [(1) Total des reliquats] Then 1 otherwise Blank()

 

But it does not work, Any idea?

 

Kind regards

 

 

 

11 REPLIES 11
SebSchoon1
Post Patron
Post Patron

Hello @DimaMD  here's a link

 

🙂

 

https://we.tl/t-GPXPMGuUKB

 

 

@SebSchoon1 I made changes to this event and the event with the condition worked
Screenshot_27.jpg
But your data in the picture do not match what you provided


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

@DimaMD  I have sent another link

 

where you can find both examples.

 

https://we.tl/t-6aPbNaUszH

 

Wow,

 

may thanks for going into this,

 

it is strange that the date are different

 

here's another link with two examples

 

one where it works as expected.

 

and another one (just below) 

 

Whioch does not work and i don't no why 😞

 

https://we.tl/t-6aPbNaUszH

Hi @SebSchoon1 After examining the fascist sample data, I found that your measure (1) Total des reliquats gives the wrong value. 
I suggest you use (1)Nombre entier Répartition in your event:
Screenshot_28.jpg

If(
    [Rank Pour Dispatch] <= [(1)Nombre entier Répartition] && [Rank Pour Dispatch] <> BLANK() , 1, Blank())

 


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

Hello @DimaMD 

 

Concerning the measure, it will not work since

 

if i have two items for 3 wharehouse it will not split the remaining quantities

 

since full number is 0 and remaining quantities = 0.67  

 

it will not consider  the total remaining quantities  (0.67 * 3 ) = 2 

 

So it will not work 🙂

@SebSchoon1 I'm sorry, after looking at your first post, I realized that you are not fulfilling the condition correctly,
Your condition should be like this change <= to >=

(1)Attribution des reliquats = If([Rank Pour Dispatch]<>blank() && [Rank Pour Dispatch] >= [(1) Total des reliquats] ,1,Blank())

 Screenshot_29.jpg


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

Hello,

 

it does not work, since I'd like to Have Rank 1 As most important priority

 

:s I think that it must come from my [(1)Total de reliquats ARTICLE]

 

Wich seems to show results but if fact it is wrong.

Hello @DimaMD 

 

thank you for having taken a glance on it.

 

May i ask you why the information i see on my table is not verified with IF measures?

 

my formula to test

 

Test Qté articles = if([(1) Total des reliquats]=2,"y","n")
 
the result (Wrong)
 
SebSchoon1_0-1663657518723.png

 

It shows me "n" eve if my items are = to 2

 

here's my formula to obtain "(1)Total des reliquats"

 

(1) Total des reliquats = if([Rank Pour Dispatch]<>BLANK(),CALCULATE(([(1)Nombre décimal Répartition]*[Nb Dépots stocks dispo]),ALLSELECTED('Tableau Dispatch'[CODE DEPOT])),BLANK())µ
 
here is how i obtain the Décimal part of repartition
(1)Nombre décimal Répartition = CALCULATE(MOD([(1)Répartition par stock],1))
 
Here is how i obtain the number of authorised warehouses ([Nb Dépots stocks dispo])
 
Nb Dépots stocks dispo = if([Rank Pour Dispatch]<>blank(),CALCULATE(DISTINCTCOUNT('Tableau Dispatch'[CODE DEPOT]),all('Dépots et etablissements'[CODE DEPOT])),BLANK())
 
 
it is really a strange behavior no?
 

@SebSchoon1  Yes, it is strange


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
DimaMD
Solution Sage
Solution Sage

hi @SebSchoon1  Try it 

 

if = If [Rank Pour Dispatch] <= [(1) Total des reliquats],1, Blank()

 


Without sample data, it is difficult to conduct analyses


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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