Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I struggle with using date inside a formula. I have tried many different options, none is working.
Here is my current formula, somehow it seems like I cannot pull the month and date out from the "Max(date)"
The only thing that works is when I hard code the date like this Date(2023, 10, 31), as you can see in my formula I try to add a variable, it does not work. However, this variable works if I write it in a Measure....
The table Calendar is an island, not connected to any other table. And I use a date-slicer for defining what date it is.
I have tried to format all dates, both in the Query data loading, and in front view.
I have tried using Month(Max(Date)) etc, I have tried Mid(Max(Date),4,2), or Left(Max(Date),2) etc....
I have tried to add new column in my table, new measure...
What is the reason for this struggle with date and date format?
Best regards
E
I can still not figure out how to send the value of selcted "Date" to my column for calculation when the tables are not connected.
However it seems that the year-value is picked up as the value I get in return is the value for Max(Date) for the whole year...
debt by lenders = VAR selYear =Right(Max('Calendar'[Date]),4)
VAR selMonth = Left(Max('Calendar'[Date]),2)
VAR selDay = Mid(Max('Calendar'[Date]), 4,2)
Return
CALCULATE(SUMX(factSecurity, factSecurity[Loan Balance Start]), factSecurity[Dates] = Date(selYear, selMonth, selDay)) * CALCULATE(AVERAGEX(dimBankAndGuarantor, dimBankAndGuarantor[Share]))
*HELP*
🙂
Hi @powerbi_Mandal The table Calendar is an island, not connected to any other table - why not connect it?
If two date columns, Calendar[Date] and factSecurity[Date] have the same data type it should work (together with relationship).
Proud to be a Super User!
Well, this dasboard is covering many other topics where a date island seems to be my best option, i would rather not rebuild the whole model at this moment.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 8 | |
| 8 |