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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Index and Vergleich

Gaucho_0-1673007072502.png

 

How can i enter these excel commands in power bi dax? I would like this syntax for Power Bi dax Thank you

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Anonymous ,

You can create a calculated column as below to get it, please find the details in the attachment.

Column = 
VAR _value =
    VALUE ( LEFT ( 'Table'[G.GBOBJ], 2 ) )
RETURN
    SWITCH (
        TRUE (),
        _value >= 90, "Ergenis verwendung",
        _value >= 80, "80 Steuern",
        _value >= 74, "74 Zinsen und ahnliche Aufw.",
        _value >= 72, "72 Zinsen und ahnl. Ertrage",
        _value >= 70, "70 Ertrage aus Beteiligungen",
        _value >= 60, "60 Sonst. Betriebliche Aufw",
        _value >= 50, "50 Abschreibungen",
        _value >= 45, "45 Personalaufwand",
        _value >= 40, "40 Materialaufwand",
        _value >= 33, "33 Sonst. betriebl. Ertrage",
        _value >= 30, "30 Umsatzerlose"
    )

yingyinr_0-1673253570193.png

Best Regards

View solution in original post

Anonymous
Not applicable

7 REPLIES 7
Anonymous
Not applicable

Hi @Anonymous ,

If I understand correctly, it seems that you would like to get the rows which include some specific text. If yes, you can achieve the same requirement in Power BI by using DAX LOOKUPVALUE function.

Find The Data Value using LookupValue DAX Function in Power BI; Simple and Useful

yingyinr_0-1673248255483.png

In addition, you can provide some raw data in your excel file (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Later we will check and give you a suitable solution base on your provided info. Thank you.

How to upload PBI in Community

Best Regards

Anonymous
Not applicable

Hi @Anonymous thank you for the effort put, but the solution you propose is for another case, in my case i give all the Text you saw in Index and i compare with the first two numbers in the SachKonto, for example in Sachkonto i have the number 305600, i first take the first two numbers in the begining and compare, if "30 Umsatzerlöse"=30 it will give me 30 Umsatzerlöse.

Gaucho_0-1673250881193.png

I want to have the above result in the screenshort where i wrote in sql form. the G.GBOBJ stands for SaCHKONTO in the previous Screenshort table i posted.

Thank you

Anonymous
Not applicable

Hi @Anonymous ,

You can create a calculated column as below to get it, please find the details in the attachment.

Column = 
VAR _value =
    VALUE ( LEFT ( 'Table'[G.GBOBJ], 2 ) )
RETURN
    SWITCH (
        TRUE (),
        _value >= 90, "Ergenis verwendung",
        _value >= 80, "80 Steuern",
        _value >= 74, "74 Zinsen und ahnliche Aufw.",
        _value >= 72, "72 Zinsen und ahnl. Ertrage",
        _value >= 70, "70 Ertrage aus Beteiligungen",
        _value >= 60, "60 Sonst. Betriebliche Aufw",
        _value >= 50, "50 Abschreibungen",
        _value >= 45, "45 Personalaufwand",
        _value >= 40, "40 Materialaufwand",
        _value >= 33, "33 Sonst. betriebl. Ertrage",
        _value >= 30, "30 Umsatzerlose"
    )

yingyinr_0-1673253570193.png

Best Regards

Anonymous
Not applicable

Thank you very.

Anonymous
Not applicable

@Anonymous i need another help. I took a date in a Database with the year 18,19,20,21,22 and i load it but it came as decimal but when i try to convert these to Date it comes out as 1900. and i don't know how to get the right date. Thanks

Anonymous
Not applicable

Hi @Anonymous ,

You can raise a new post in the community, please include some sample data and screenshot in it to explain your requirement or problem. It would be helpful to find out the solution. Later we will check it and give you a suitable solution for your new problem. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

Best Regards

lukiz84
Memorable Member
Memorable Member

Hi,

 

a) was willst du erreichen?

b) besser hier auf englisch die Fragen stellen, kommen mehr Antworten 😉

 

lg

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.