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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jlarques
Helper V
Helper V

Export data to the new company

Dear community,

I want to solve a problem with my customer.

 

The company was working with a corporate name until June 2020. After this date, the company changed its name and the data has the new name from 1st of July 2020. 

 

I want to calculate the number of units considering every company name and I was using this DAX formula:

IF(

    VALUES(

        EMPRESA[NOMBRE]

     )="CBS"; Total Units; 

     IF(
         VALUES(

             EMPRESA[NOMBRE]

          )="FMW"; Total Units;

          Total Units

       )

)

 

This formula calculates the unit number depending if the company name is CBS, FMW, or another company because there are more companies that are included in the data. The problem is that the VALUES formula creates a table and an error appears telling me that:

"

a multi-value table was provided, where only one value was expected

Do you know any other way to calculate these values?

 

Thanks for everything.

 

5 REPLIES 5
v-janeyg-msft
Community Support
Community Support

Hi, @jlarques 

 

It seems that Total Units is a measure. You can modify the code like this:

a =
IF (
    SELECTEDVALUE ( EMPRESA[NOMBRE] ) = "CBS",
    [Total Units],
    IF ( SELECTEDVALUE ( EMPRESA[NOMBRE] ) = "FMW", [Total Units], [Total Units] )
)

If you still have problems, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

Hi @v-janeyg-msft,

thanks for your answer. I can't test your proposal until tomorrow. I'll test it tomorrow and I'll tell you if it works.

 

Best regards,

 

 

 

 

Hi, @jlarques  Any updates?

amitchandak
Super User
Super User

@jlarques , you should create SCD, explained by guyinacube -https://www.youtube.com/watch?v=tKeaQpWynzg

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak 

thanks for your answer. This is exactly what I want but it's not easy to understand. I have an issue because data from the first company and data from the last company appear duplicate. I think is a relationship problem. 

 

I'm fighting with that and with Janey's help, I hope to find the right solution. I'll inform the community about the solution.

 

Thanks for your help.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.