Forum Discussion
CAMBIAR DAX A SQL
- 5 years ago
Hi Anonymous ,
I'm not an expert on SQL but to my knowledge you need to have a select as a filter or similar to get the data so you would need something similar to:
Select MIN (table1.PhaseStatus), table1.DateTime From 'Ventas' as table1 Where table1.dtmData = ( Select mAX ( table2.DateTime) as datemax from 'Ventas' table2 ) group by table1.DateTimeBe aware that the allselected is a way of getting filtered data in DAX so if you need to filter the information you need to had values to it.
This table will only give you a single value because it's picking up the maximum date of the table and returning the minimum value for that date if you want the minimum value for all the dates in your table you should use the following SQL:
Select MIN (table1.PhaseStatus), table1.DateTime From 'Ventas' as table1 group by table1.DateTimeThis will return a table with all dates and for each one the minimum value.
Greg_Deckler 👍 I'm not an expert in SQL probably there are some gurus outthere in the forum but I can make my way around it, thanks for the shout out.
Anonymous , You need SQL for this ?