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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Yashodhan
Frequent Visitor

Power Query

Having Issue with this query,what will be the right Solution ? please SuggestHaving Issue with this query,what will be the right Solution ? please Suggest

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Yashodhan , This DAX is not power Query. In Power Query you need to merge data to get a column from another table

refer if needed

https://eriksvensen.wordpress.com/2019/02/28/powerquery-replicate-doing-an-excel-vlookup-in-m/

View solution in original post

v-eqin-msft
Community Support
Community Support

Hi @Yashodhan ,

 

M Language and DAX are supported by Power BI to manage, manipulate, filter, and analyze the data. but they are not the same and not dependent upon each other and each one has different syntax, structure, and logic.

 

Based on your screenshot, it seems that you want to set a flag column based on a related column from two tables.

If so, I have built a data sample as shown below:

Eyelyn9_3-1639102583241.png

 

 

Please try:

  • Use DAX: Add a Column
Column(DAX) = IF(ISBLANK(RELATED(TABLE2[Monthly BRAESN])) && ISBLANK( RELATED(TABLE2[Monthly ESN] )),"New","Old")

Eyelyn9_5-1639102704980.png

 

 

  • In Power Query: Merge two tables and Expand columns-->Add a custom column-->Remove unnecessary columns
=if [Monthly BRAESN] is null and [Monthly ESN] is null then "New" else "Old"

Eyelyn9_2-1639102495547.png

 

 

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

View solution in original post

2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @Yashodhan ,

 

M Language and DAX are supported by Power BI to manage, manipulate, filter, and analyze the data. but they are not the same and not dependent upon each other and each one has different syntax, structure, and logic.

 

Based on your screenshot, it seems that you want to set a flag column based on a related column from two tables.

If so, I have built a data sample as shown below:

Eyelyn9_3-1639102583241.png

 

 

Please try:

  • Use DAX: Add a Column
Column(DAX) = IF(ISBLANK(RELATED(TABLE2[Monthly BRAESN])) && ISBLANK( RELATED(TABLE2[Monthly ESN] )),"New","Old")

Eyelyn9_5-1639102704980.png

 

 

  • In Power Query: Merge two tables and Expand columns-->Add a custom column-->Remove unnecessary columns
=if [Monthly BRAESN] is null and [Monthly ESN] is null then "New" else "Old"

Eyelyn9_2-1639102495547.png

 

 

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

amitchandak
Super User
Super User

@Yashodhan , This DAX is not power Query. In Power Query you need to merge data to get a column from another table

refer if needed

https://eriksvensen.wordpress.com/2019/02/28/powerquery-replicate-doing-an-excel-vlookup-in-m/

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors
Top Kudoed Authors