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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
FML
Regular Visitor

Startofmonth() in Virtual Table

buen día, no puedo utilizar la función Startofmonth() con una columna de una tabla virtual, generada mediante crossjoin. Me pueden ayudar por favor ? gracias

 

FML_0-1743519330889.png

 

1 ACCEPTED SOLUTION

Trying using this instead

 

Eomonth( [value], -1) + 1


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

10 REPLIES 10
FML
Regular Visitor

thanks for for answer, but it doesn't work !

FML_0-1743520602586.png

 

Trying using this instead

 

Eomonth( [value], -1) + 1


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
FML
Regular Visitor

Excellent Deku !!!! it works !!!

Can you explain me how it works and why endofmonth doesn´t ?

Hi @FML,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

The time intelligence functions are funny and I try to stay away from them.

 

Alot of info here


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
Deku
Super User
Super User

Remove the calculate to avoid context transition


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
FML
Regular Visitor

OK, THANKS, 

last question,

 I need to retrive a value from a table "f_Forecast Litros" .
I´m trying to use lookup value with the column @InicioMe (a column generated in my virtual table, but I can´t select it (similar to Value) I think its the same issue, the filter context but I don´t know how to solve this, can you help me please ?


FML_0-1743525876333.png

 

If you create a field with addcolumns, you cannot access it from another column in the same addcolumn expression. You would be able to access it if you were to iterate the virtual table with sumx or addcolumn. 

 

What you can do is, instead of defining @InicioMe as a field, you can define it as a variable within @forecast mes

 

Addcolumns(

... ,

"Forecast mes"

Var @InicioMe = ....

Return

....

)


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
FML
Regular Visitor

hi,

I accessed the field InicioMes from another addcolumn statment that I added as you suggested.

Now I can´t solve the Lookupvalue issue.

I need to filter the f_Forecast Litros table, but I got the following error.

Would you please check my measure ?

Thanks in adavance,

 

FML_0-1743595534024.png

 

Hi @FML 

Regarding your issue with LOOKUPVALUE, you're likely running into a limitation because you're trying to use a column from a virtual table (like InicioMes) as the search value, which LOOKUPVALUE doesn't support directly especially when it's defined within the same row context or created on the fly.

Instead of LOOKUPVALUE, try using CALCULATE with FILTER or TREATAS.


If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.