Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear pbi users,
I am trying to show the results of a month in the next month. Please see the screen below.
I am using the following formula.
Solved! Go to Solution.
Hi @Anonymous ,
Sorry for late back.
Please try this:
Measure =
VAR next =
MAXX (
FILTER (
ALLSELECTED ( 'Datum'[Datum] ),
'Datum'[Datum] < MAX ( 'Datum'[Datum] )
),
'Datum'[Datum]
)
VAR t =
ADDCOLUMNS (
ALLSELECTED ( Datum[Datum] ),
"Next", next,
"A", [1. Nog te werken p dag]
)
RETURN
MAXX ( FILTER ( t, Datum[Datum] = [Next] ), [A] )
Hi @Anonymous ,
Sorry for late back.
Please try this:
Measure =
VAR next =
MAXX (
FILTER (
ALLSELECTED ( 'Datum'[Datum] ),
'Datum'[Datum] < MAX ( 'Datum'[Datum] )
),
'Datum'[Datum]
)
VAR t =
ADDCOLUMNS (
ALLSELECTED ( Datum[Datum] ),
"Next", next,
"A", [1. Nog te werken p dag]
)
RETURN
MAXX ( FILTER ( t, Datum[Datum] = [Next] ), [A] )
Works perfectly, thanks a lot.
You're welcome. Glad it works for you.😊
@Anonymous , Really strange.
Is Datanum is date table?
If not make sure date is coming from a date table that has been marked as date .
example
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
LMTD Sales = CALCULATE(SUM(Sales[Sales Amount]),PREVIOUSMONTH('Date'[Date]))
If still you face the issue. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.
@Anonymous does the datum column in the visual from your calendar table?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k Yes, this date column is the date value from the date table.
@parry2k or @amitchandak Can one of you guys speak with me on skype so i can share my screen and show you my file?
@Anonymous I can but in an hour.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @Anonymous ,
You could try this firstly:
Measure =
VAR next =
MAXX (
FILTER ( ALLSELECTED ( 'Table'[Date] ), 'Table'[Date] < MAX ( 'Table'[Date] ) ),
'Table'[Date]
)
RETURN
CALCULATE ( [1. Nog te werken p dag], 'Table'[Date] = next )
If it can't help, please share a dummy pbix file with us. Then we can test. (For CSS team, it is prohibited to use the personal contact to help customers.)
@Anonymous formula looks correct, wondering what is the measure expression.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k the measure is:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |