Forum Discussion

bdehning's avatar
bdehning
Icon for Post Prodigy rankPost Prodigy
2 years ago

Dynamic Fiscal Month Sorting Column

I need a sample report to show me how to create a dynamic Month Sort Column.  I use Count +0 and have numerous companies with diffent fiscal Months and have a Start Date Column.  

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  bdehning ,

    I created some data:

    When you say "dynamic Month Sort Column" do you want to sort by 1-12 or do you want to sort by the number of companies in each month?

    Power BI's default sorting is alphabetical, so the following will happen, you can create a new table to join and use the columns of the new table for sorting.

     

    Here are the steps you can follow:

    1. Create calculated table.

    Table 2 =
    SUMMARIZE(
        'Table','Table'[Month],
        "mindate",MINX(FILTER(ALL('Table'),'Table'[Month]=EARLIER('Table'[Month])),[Date]),   "count",CALCULATE(DISTINCTCOUNT('Table'[companies]),FILTER(ALL('Table'),'Table'[Month]=EARLIER('Table'[Month]))))

    2. Connecting the relationship between two tables.

    3. Setting up the scheduling sequence.

    If you want to sort by 1-12, click [Month] - Column Tools - Sort by Column - [mindate]

    If you want to sort by the number of companies based on each month, click [Month] - Column tools - Sort by column - [mindate]

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

    • bdehning's avatar
      bdehning
      Icon for Post Prodigy rankPost Prodigy

      To answer your question,  I have a column chart in which I want to show the counts per month for each company that is selected by a slicer.  Count + 0 has been providing me with 0 months before companies were customers.    I do have have each companies start date, which I think is the key.   I will take a look at your soluation later in the week or on Saturday.  

       

      The chart should begin with the month the company became a company which could be any day of the year and there are thousands of companies.