The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Experts,
I want to filter quantity in the sales orders in the next 2 years. I traid to create a mesure, but it's not work as below :
Solved! Go to Solution.
Hi,
Here is one way to do this:
example data:
Here we will show values 1, 2 and 3 since 4 and 5 are outside the 2 year period wanted.
In addition to the original table we will need a calendar table:
Dax:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Hi,
Here is one way to do this:
example data:
Here we will show values 1, 2 and 3 since 4 and 5 are outside the 2 year period wanted.
In addition to the original table we will need a calendar table:
Dax:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Your measure is on the right track, but you'll want to incorporate a filter for the next two years, and ensure that the measure syntax is correct.
so maybe try
Next2YearsQty =
CALCULATE(
[CM_SalesLine_SalesOrderLine_OrderQuantity],
FILTER(
ALL(Fact_SalesOrderLine[ShippingDateRequested_NK]),
Fact_SalesOrderLine[ShippingDateRequested_NK] > TODAY() &&
Fact_SalesOrderLine[ShippingDateRequested_NK] <= DATEADD(TODAY(), 2, YEAR)
)
)
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |