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
united2win
Helper III
Helper III

DAX QUERY - SUM VLOOKUP

Hi,

 

I have the below two tables:

Table 1

ConcatenateTime Spent
DE-VAT Return2
DE-VAT Return3
FR-VAT Return7

 

Table 2:

 

ConcatenateCountSum Time Spent
DE-VAT Return2DAX Formula? (5)
FR VAT Return1DAX Formula? (7)

 

What is the DAX formula I need to include in table 2 to add the sum of Time Spent?

1 ACCEPTED SOLUTION
5 REPLIES 5
harshnathani
Community Champion
Community Champion

 

Hi @united2win ,

 

 

Create a Column in Table1.

 

Column = CALCULATE (Table1 [TimeSpent]), Filter( Table1, Table1[Concatenate] = EARLIER(Table1[Concatenate])))


Then do a lookup in table 2

 

Lookup value = Lookup (Table1[Column], Table1[Concatenate] , Table2[Concatenate])

 

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Surely, there must be a simplier way without having two additionals columns?

amitchandak
Super User
Super User

@united2win , assume the text in the first one is "DE-VAT Return 2"

Use split by column and split it by space  into 3 column

https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

col1, col2, col3

DE-VAT, Return, 2

 

Then count(Table[Col1])

time Spend =Sum(Table[Col1])

 

 

Hi Amit, 

 

The values of time spent are in the "Time Spent" column, so no need to split by column (space delimeter). The formatting of the table just doesn't show this. 

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.