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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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