Forum Discussion
rajbi2020
6 years agoFrequent Visitor
Need help to sum depending on mutliple conditons.
Hi All, I need some help .. I have 3 tables where one is BILLING ,users list and team ,currentteam. with Employe and current dept .I wanted to calculate the sum for each YTD for EMPLOYEE ,by tea...
smarthp29
Helper I
6 years agoYou would require 1 calculated column to tag the latest department in the billing table and based on that you can create your measure.
Lastest Dept Tagging = IF(Billing[Dept] = CALCULATE(MAX(CurrentUser[Dept]),ALLEXCEPT(CurrentUser,CurrentUser[Employee])),TRUE(),FALSE())
Total Amount = IF(DISTINCTCOUNTNOBLANK(EmployeeYTD[Team])>1,CALCULATE(SUM(Billing[Amount]),Billing[Lastest Dept Tagging]=TRUE()),SUM(Billing[Amount]))
Output Table
EmployeeYTD Table
Billing Table
CurrentUser Table
rajbi2020
6 years agoFrequent Visitor
I will try now thanks .