Forum Discussion

Rustin788's avatar
Rustin788
Frequent Visitor
2 years ago
Solved

Month Order / Multiple Tables

Hey,   I'm setting up a new report.  For this report, I get the daily values from a simple dataset that just has (Year, Month, SKU, Cases Sold) that updates daily.  I have another data set that has...
  • audreygerred's avatar
    audreygerred
    2 years ago

    Just to confirm, you have a FACT table that has Year, Month, SKU and QTY; you have a DIM table for SKU that has SKU, Color, Description, etc., and you have a date table, correct? If this is accurate, you will need to have a bridge table to connect your dim date table to your fact table. The bridge table would have year and month and a concatenation to be the key. You would need the same concatenation on your DIM Date and your fact table so that you could join the fact to the bridge table. 

     

    For your ordering on the months, instead of using a calculated column, go into Power Query and add a conditional column (if Month = Jan then 1, add rule and if Month = Feb then 2, etc.). Then, in Power BI select Month and sort by the month number column you added in Power Query. Or, if you switch to the Date Reference table from SQLBI that I talk about in the blog, it already has month number as a field that can be used to sort Month Name.