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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
sreddy47652
Helper III
Helper III

Convert Tableau expression into power bi DAX

Hi Team, Need some help to convert tableau expression to power bi "ATTR([TSR Created Date _ Today N])", i tried with selectedvalue function but it's not working so can anyone help me how to convert from Tableau to Power bi.

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@sreddy47652 These usually go better if you provide sample data and expected result but in this case, I believe the equivalent DAX is:

 

Measure = 
  VAR __Table = SUMMARIZE( 'Table', [TSR Created Date _ Today N] )
  VAR __Result = IF( COUNTROWS( __Table ) > 1, "*", MAXX( __Table, [TSR Created Date _ Today N] ) )
RETURN
  __Result

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @sreddy47652 ,

See the below data:

vyilongmsft_0-1724221325433.png

When I use attr:

vyilongmsft_1-1724221216437.png

Final I get:

vyilongmsft_2-1724221216615.png

 

Import data to Power BI:

vyilongmsft_1-1724221885581.png

You can try this DAX code: 

ATTR = 
VAR MAXVALUE =
    CALCULATE (
        MAX ( 'Table'[State] ),
        FILTER ( ALL ( 'Table' ), 'Table'[City] = MAX ( 'Table'[City] ) )
    )
VAR MINVALUE =
    CALCULATE (
        MIN ( 'Table'[State] ),
        FILTER ( ALL ( 'Table' ), 'Table'[City] = MAX ( 'Table'[City] ) )
    )
RETURN
    IF ( MAXVALUE = MINVALUE, MAX ( 'Table'[State] ), "*" )

Finally you will get what you want.

vyilongmsft_2-1724222279081.png

 

 

 

Best Regards

Yilong Zhou

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

Greg_Deckler
Community Champion
Community Champion

@sreddy47652 These usually go better if you provide sample data and expected result but in this case, I believe the equivalent DAX is:

 

Measure = 
  VAR __Table = SUMMARIZE( 'Table', [TSR Created Date _ Today N] )
  VAR __Result = IF( COUNTROWS( __Table ) > 1, "*", MAXX( __Table, [TSR Created Date _ Today N] ) )
RETURN
  __Result

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors