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
JG
New Member

dax search( two fields in expression

 

Hello !

 

Here is my problem :

 

My source in Powerpivot named DATA

 

MODELEQTE
LA DEFENSE PEUGEOT 20812
REPUBLIQUE PEUGEOT 500818
BASTILLE PEUGEOT 30816
GARE DE L'EST PEUGEOT 5081
LA DEFENSE RENAULT SCENIC10
REPUBLIQUE RENAULT CLIO4
BASTILLE RENAULT KANGOO8
GARE DE L'EST RENAULT TWINGO13

 

I want to have these result :

 

MARQUENOMBRE
PEUGEOT47
RENAULT35

 

 

I tried with a Powerpivot Inversed Table by creating these table named Marque in Powerpivot

MARQUE
PEUGEOT
RENAULT

 

And trie the Dax Function who doesn't work :

 

Evaluate(
   AddColumns(
   Marque,
   "Nombre",Calculate(sum(Data[QTE]),Find([MARQUE],DATA[MODELE],,0))
   )
)

 

 

Is there another way to have my result or what is the Dax formula to have it

 

Thank you for your help. 

1 ACCEPTED SOLUTION

Create a new table called models that has the modele column and a new column called brand.  The modele column must be unique values. Join this new table to the data table using the common modele column

 

create a table visual using the brand column from the models table then drag the qte column from the data table. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

2 REPLIES 2

Create a new table called models that has the modele column and a new column called brand.  The modele column must be unique values. Join this new table to the data table using the common modele column

 

create a table visual using the brand column from the models table then drag the qte column from the data table. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

I'm not sure but I think you need to wrap your "Find" function inside a "Filter" function.

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.