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
drrai66
Resolver I
Resolver I

Formula Conversion

HI People,

How can I convert This Tableau Formula to Power BI?

 

{FIXED [ID:MAX(IF [Item]="A THEN [Item]END)}

 

This would find if Item="A" for ID 1, then It would write A across all Rows for 1.

 

IDItemResult
1AA
1BA
1CA

 

Thanks

Deepak

2 ACCEPTED SOLUTIONS

Hi Daniel,

Your logic will definitely work in the case "A" is minimum, which is actually Minimum in the example  but actually my Data set is something like this

 

Suppose  the dataset Looks like This:

 

IDItem
1Soap
1Pen
1Pencil
2Soap
2Rubber
2Paper

 

 


In Tableau, I would Simply write this  

 

{FIXED ID:MAX(IF Item="Soap" Then Item end)}

 

to get This:

 

IDItemResult
1SoapSoap
1PenSoap
1PencilSoap
2SoapSoap
2RubberSoap
2PaperSoap

 

I am looking for Similar Logic in Power BI.

 

Thanks a lot

Deepak

 

 

View solution in original post

Hi @drrai66,

Based on my test, you could try this formula:

Measure = CALCULATE(MAX(Table1[Item]),FILTER(ALL('Table1'),'Table1'[Item]="M"))

Result:

1.PNG

 

Regards,

Daniel He

Community Support Team _ Daniel He
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

5 REPLIES 5
v-danhe-msft
Employee
Employee

Hi @drrai66,

Based on my test, you could refer to below formula:

Measure = CALCULATE(MIN('Table1'[Item]),FILTER(ALLSELECTED('Table1'),'Table1'[ID]=1))

Result:

1.PNG

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Daniel,

Your logic will definitely work in the case "A" is minimum, which is actually Minimum in the example  but actually my Data set is something like this

 

Suppose  the dataset Looks like This:

 

IDItem
1Soap
1Pen
1Pencil
2Soap
2Rubber
2Paper

 

 


In Tableau, I would Simply write this  

 

{FIXED ID:MAX(IF Item="Soap" Then Item end)}

 

to get This:

 

IDItemResult
1SoapSoap
1PenSoap
1PencilSoap
2SoapSoap
2RubberSoap
2PaperSoap

 

I am looking for Similar Logic in Power BI.

 

Thanks a lot

Deepak

 

 

Hi @drrai66,

Based on my test, you could try this formula:

Measure = CALCULATE(MAX(Table1[Item]),FILTER(ALL('Table1'),'Table1'[Item]="M"))

Result:

1.PNG

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes That's It!!! Thanks a Lot

This would be something along the lines of a measure with the formula:

=CALCULATE(MAX(Table[Item]), ALLEXCEPT(Table, Table[ID]))

 

FIXED LODs roughly translate to ALLEXCEPT:

https://dataveld.com/2018/02/17/tableau-to-power-bi-fixed-lod-expressions/

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.

Top Solution Authors