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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tonny_bwg
Helper I
Helper I

Dynamic display inventory value for Past N period based on selected slicers value

Hi, Gurus
 I want to create a report to dynamicly show inventory value based on slicers select. 
for example: currently Month and 202307 are selected. Parameter sets to 5, the chart will show the inventory value from 202302 to 202307.  Quater and Year are the same logic.  how to create a dynamic inventory value measure to switch to difference value accoring to the selection.
thanks for your help.

--Tonny

tonny_bwg_0-1690361795971.png

tonny_bwg_1-1690362224706.png

Date slicers DAX:
dim_Date3 =
 VAR _t1 =
        SELECTCOLUMNS(dim_Date,
                      "Date", [Date],
                      "Display", [Year],
                      "Sequence", [ySequence],
                      "Type", "Year",
                      "TypeId",3)
 VAR  _t2 =
        SELECTCOLUMNS(dim_Date,
                      "Date", [Date],
                      "Display", [Year]&[Quarter],
                      "Sequence", [qSequence],
                      "Type", "Quarter",
                      "TypeID",2)

 VAR _t3 =
      SELECTCOLUMNS(dim_Date,
                      "Date", [Date],
                      "Display", [YearMonth],
                      "Sequence", [mSequence],
                      "Type", "Month",
                      "TypeID",1)

 Return
   UNION(_t1,_t2, _t3)

 

0 REPLIES 0

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.