Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
this is my pbix file : https://1drv.ms/u/s!Ag9tIyk2ofNRjk7ex9NVCSWmzVF9?e=hzuIkt
i have this measure:
Expenses =
var NEWtotalrevenue = CALCULATE(SUM(Revenue[Total]),FILTER('Calendar','Calendar'[Date] >= DATE(2022,10,3)))
VAR OLDtotalrevenue = CALCULATE(SUMX(Revenue,Revenue[Amount]*Revenue[Qtty]),FILTER('Calendar','Calendar'[Date] < DATE(2022,10,3)))
VAR totalrevenue = OLDtotalrevenue + NEWtotalrevenue
Var newsalesmanrevenue = CALCULATE(SUM(Revenue[Total]),FILTER('Calendar','Calendar'[Date] >= DATE(2022,10,3)),Revenue[Salesman]="A")
VAR Oldsalesmanrevenue = CALCULATE(SUMX(Revenue,Revenue[Amount]*Revenue[Qtty]),FILTER('Calendar','Calendar'[Date] < DATE(2022,10,3)),Revenue[Salesman]="A")
VAR salesmanrevenue = Oldsalesmanrevenue + newsalesmanrevenue
VAR percentage = salesmanrevenue/totalrevenue
var expenses = SUM(Expense[Total])
return
expenses*percentage
those are the pictures:
expense table:
revenue table:
week 40 :
week 41:
both selected weeks:
as you see expense on both selected dates is 801.01
but if you manually add week 40 and week 41,
i get 365.30 + 431.27 = 796.57
any help is appreciated
@Jihwan_Kim
Solved! Go to Solution.
Hi,
I am not sure if I understood the question correctly, but please try the below measure whether it suits your requirement.
Expenses V2 =
VAR _newtable =
ADDCOLUMNS (
DISTINCT ( 'Calendar'[Week of Year] ),
"@percentage", [Percentage V2],
"@expensetotal", CALCULATE ( SUM ( Expense[Total] ) )
)
RETURN
SUMX ( _newtable, [@percentage] * [@expensetotal] )
Hi,
I am not sure if I understood the question correctly, but please try the below measure whether it suits your requirement.
Expenses V2 =
VAR _newtable =
ADDCOLUMNS (
DISTINCT ( 'Calendar'[Week of Year] ),
"@percentage", [Percentage V2],
"@expensetotal", CALCULATE ( SUM ( Expense[Total] ) )
)
RETURN
SUMX ( _newtable, [@percentage] * [@expensetotal] )
Youre a life saver thank you
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |