The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hey everyone,
I'm trying to populate the right hand column below.
It calculates the minimum quantity purchased in the last twelve months from the date of every row.
In excel, the function would be: minif (quantity column, description of all rows = description of current row, date of every row <= date of current row, date of every row >= (date of current row -365)
Struggling to translate the function to PBI? I guess it's shouldn't be a measure as every row has a separate value? Should it be a new column?
Any help would be greatly appreciated! thank you.
Solved! Go to Solution.
Following is a calculated column
Min QTY Last 12 Months =
MINX (
FILTER (
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Description] ) ),
'Table'[Date] <= EARLIER ( 'Table'[Date] )
&& 'Table'[Date]
> EARLIER ( 'Table'[Date] ) - 365
),
'Table'[Quantity]
)
Hi @tamerj1
This is super super helpful! Thanks a lot for the help, saved me 1 day of useless work trying to figure this out.
I do have another function that is similar but a bit more complex? Can I pls ask for it?
Yes sir my bad
Following is a calculated column
Min QTY Last 12 Months =
MINX (
FILTER (
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Description] ) ),
'Table'[Date] <= EARLIER ( 'Table'[Date] )
&& 'Table'[Date]
> EARLIER ( 'Table'[Date] ) - 365
),
'Table'[Quantity]
)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
63 | |
32 | |
21 | |
16 | |
15 |
User | Count |
---|---|
94 | |
33 | |
30 | |
24 | |
21 |