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
Anonymous
Not applicable

Divide measure by spesific value from cloumn (cant be aggregated)

Hello, 

I need to calculate the following measure:

 

[Target_Gap] / No_remaining_deliveries 

 

"No_remaining_deliveries" column exists in Table A (for example) and in table A i have copy_datetime column as well. 

In the measure that i want to callculate i need to relate to No_remaining_deliveries value that comes from max(copy_copy_datetime). 

 

KatyaK_0-1629301737194.png

Each row in the table represents No of remaining deliveries of different customers (same customer can have several rows)

 

How can I solve it? 

 

Thanks In advance:)

 

 

 

 

 

3 REPLIES 3
Anonymous
Not applicable

Is there anyone that can help? 

amitchandak
Super User
Super User

@Anonymous , Try one of the two measures

 


calculate(sumx(values(Table[customer]), calculate(sum(Table[No_remaining_deliveries ]))), filter(Table, table[copy_datetime ] = max(Table[copy_datetime ])))

 

or


calculate(lastnonbalnkvalue(Table[copy_datetime], calculate(sum(Table[No_remaining_deliveries ]))), filter(allselected(Table),Table[customer] =max(Table[customer])))

Anonymous
Not applicable

Wow Thanks the second query works!!!

But now I have another issue - if i put employee_id, customers_id and the query you created in matrix (employees on the highest level) i cant see the results from employees level only when i look from the customers perspective.

The employee_id exists in the same table with the customers and the copy_datetime column.

How can i specify it for the employees as well ? 

KatyaK_0-1629308256354.png

 

 

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.