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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Wresen
Post Patron
Post Patron

IF statment for second table not found

Hi all

I have problem a with IF statement for the second table (its a bit complicated but i will try and explain it)

Capture.PNG

I have 2 tables linked together FIXED MONTH and MONTH 2 is linked together. The slicer Month is table not linked to anyone.
What shuld happen is that i choose a value in the slicer , the left table is checked if slicervalue = MONTH 1 and < FIX MONTH with seems to work as seen on the measure "Check"  "YES"
The MATTE Measure is cheeking "Check" , IF YES then FIX VALUE , witch also works on the left table.
This should now be applied to the right table  and the measure "MATTE" values should be added on right table using the FIX MONTH as month  , and as u can see it works on 2 of the 5 values.I do not understand why the 21 value (MONTH 1 201805 , FIX MONTH 201902) , value 4 (MONTH 1 201805 , FIX MONTH 201904) and value 6 (MONTH 1 201805 , FIX MONTH 201906) is not added to the right table. 

There is other strange things if i choose some other slicer value ,  if i choose 201802 on the slicer everything is found on the left table  as it should but not shown on the right table as it should
Capture1.PNG

I hope that i have explained the problem well.
Help really appreciated 

/Thanks

1 ACCEPTED SOLUTION
PhilC
Resolver I
Resolver I

Hi,

 

Firstly, this might be better placed in the Power BI forum, rather than Power Query as it is a model question, not a query editing question.

 

A picture of the data model (ie how the tables are linked) would be good, along with your measures.  If you can provide the file, or a mockup if the data is confidential, even better.

 

Try linking FIX MONTH in Table 1 and MONTH 2 in Table 2 to the SLICER MONTH field, so they are linked via that table, not directly.

 

Cheers

 

View solution in original post

3 REPLIES 3
PhilC
Resolver I
Resolver I

Hi,

 

Firstly, this might be better placed in the Power BI forum, rather than Power Query as it is a model question, not a query editing question.

 

A picture of the data model (ie how the tables are linked) would be good, along with your measures.  If you can provide the file, or a mockup if the data is confidential, even better.

 

Try linking FIX MONTH in Table 1 and MONTH 2 in Table 2 to the SLICER MONTH field, so they are linked via that table, not directly.

 

Cheers

 

Thanks so much for the help, and i am sorry that i put this in the wrong forum

 

Linking the Slicer Month fields did the trick , it seems to work now as it should 🙂

 

Wresen
Post Patron
Post Patron

Hi all

I have problem a with IF statement for the seconed table (its a bit complicatedt but i will try and explain it)

 

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I have 2 tables linked togather FIXED MONTH and MONTH 2 is linked togater. The slicer Month is table not linked to anyone.

What shuld happen is that i choose a value in the slicer , the left table is checked if slicervalue = MONTH 1 and < then FIX VALUE with seems to work as seen on the measure "Check"  "YES"

The MATTE Measure is cheaking "Check" , IF YES then FIX VALUE , witch also works on the left table.

 

This should now be applied to the right table  and the measuere "MATTE" values should be added on right table using the FIX MONTH as month  , and as u can see it works on 2 of the 4 values.

I do not understand why the 21 value (MONTH 1 201805 , FIX MONTH 201902) and value 4 (MONTH 1 201805 , FIX MONTH 201904) is not added to the right table. 

 

There is other strange things if i choose some other slicer value ,  if i choose 201802 on the slicer everthing is found on the left table  as it should but not shown on the right table as it should,

Capture1.PNG

I hope that i have explained the problem well.

Help really appriciated 

/Thanks

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors