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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
antonio_wurth
Helper I
Helper I

dax aas sum of other measure on date level

hi folks

need help with formula

i have inventory transaction table (income-outcome)

 

and in aas use 

movement_pcs:= sum('fact_transactions'[quantity])
 
and for inventory for date use:
 
inventory, pcs:=
VAR MaxDate = Max ('Calendar'[date_id])
VAR Result = 
    CALCULATE(
        [movement_pcs],
        'Calendar'[date_id]<= MaxDate,
        ALL('Calendar')
    )
 
return
    Result
 
 
question:
i need new measure which give me sum for each date in selected/active period
Mar 2025 -> sum of selected dates in march
Feb 2025 -> sum of selected dates in feb
Year 2025 level -> sum of Mar and Feb dates
 
antonio_wurth_1-1741891184718.png

 

 

thank you in advance

 

 


 

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @antonio_wurth ,

 

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
DISTINCT('Table'[Month])

2. Create measure.

Measure =
var _select=SELECTCOLUMNS('Table 2',"test",[Month])
RETURN
IF(
    ISINSCOPE('Table'[Year]),SUM([inventory,pcs]),SUMX(FILTER(ALL('Table'),'Table'[Month] in _select),[inventory,pcs]))

3. Result:

vyangliumsft_0-1741930438044.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

antonio_wurth
Helper I
Helper I

dax aas sum of other measure on date level
6m ago

hi folks

need help with formula

i have inventory transaction table (income-outcome)

 

and in aas use 

movement_pcs:= sum('fact_transactions'[quantity])
 
and for inventory for date use:
 
inventory, pcs:=
VAR MaxDate = Max ('Calendar'[date_id])
VAR Result = 
    CALCULATE(
        [movement_pcs],
        'Calendar'[date_id]<= MaxDate,
        ALL('Calendar')
    )
 
return
    Result
 
 
question:
i need new measure which give me sum for each date in selected/active period
Mar 2025 -> sum of selected dates in march
Feb 2025 -> sum of selected dates in feb
Year 2025 level -> sum of Mar and Feb dates
 
antonio_wurth_1-1741891897733.png

 


 

 

 

thank you in advance

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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