Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to convert a sql statement to dax

I am very new to Power BI and I am having a hard time converting a sql statement to dax.  I work in law enforcement and need to count the number of cases we have had during a certain date range in a ...
  • JarroVGIT's avatar
    JarroVGIT
    6 years ago

    Anonymous 

     

    If you want to use my idea of a MonthDay, you can create this calculated column in your datetable: (replace 'Table 2'[Date] references to your table name and date column):

    MonthDay = VALUE(CONCATENATE(FORMAT(MONTH('Table 2'[Date]), "#"), FORMAT(DAY('Table 2'[Date]), "0#")))

    Outcome:

     

    Kind regards

    Djerro123

    -------------------------------

    If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

    Keep those thumbs up coming! 🙂