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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.