Forum Discussion
DAX
- Anonymous8 years ago
Reading over your whole post i'm thinking this should be done in Power Query instead of dax. Never the less, here is the dax for Q1
Q1: Create a Custom Column:
Status = var thisRecord = [ID] RETURN CALCULATE( COUNTROWS('Table2'), ALL('Table2'), 'Table2'[ID] = thisRecord ) > 0Q2: I really really stress this is going to be a bad idea. The 'Edit Queries' are of Power BI is much better suited to creating tables. Q1 could also be achieved there as well.
Is there a specific reason you want to do this with Dax?
Thank you.How can i get current date and first working day of a month in DAX?
the formula TODAY() will give you todays date.
If you want the first working day in the month, you will need create a Date Table and create a column in that date table that tracks day of the week. From there, you should be able to use something that contains the date table to the month you care about (either via a Calcualte Statement or from a slicer) and then you need to use FIRSTDATE inside a calculate statement that constrains on only the weekdays you care about.