Forum Discussion

bsheffer's avatar
bsheffer
Continued Contributor
6 years ago
Solved

replace calculated column with measure

I need to re-bin a calculated column ("1-10" combined with "11-20" to becomes "1-20" and so forth but since I'm connected to a published dataset I cannot create a new calculated column, just measures.  I need to use this measure as the column series in a bar graph (but I think it will only take columns?) so it will need to be able to aggregate by count of accounts.  Is this possible?

  • Hi bsheffer ,

     

    'Column series' label can not add a measure, so you need to remodel in the original dataset, and then reconnect this dataset in the new .pbix file.

     

    Best regards,
    Lionel Chen

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

     

6 Replies

  • bsheffer as you already know that you can only create measures and unfortunately cannot use measure directly for visual  on x-axis etc. Two possible ways:

     

    - create bins in the original dataset (preferred)

    - create a summarize table with the new bins

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • bsheffer's avatar
      bsheffer
      Continued Contributor

      how would I create a summarized table to do the same job?  Under modelling I only have highlighted new measure and quick measure.  If I can't use the measure in the column series then I can't put the summarized table in the measure.

    • bsheffer's avatar
      bsheffer
      Continued Contributor

      type, account, date_opened, age_of_account

      house, 11, 2020-01-01, "1-30 days" -> less than 70 days

      business, 12, 2020-01-30, "1-30 days" -> less than 70 days

      house, 13, 2020-03-05, "60-70 days" -> less than 70 days

      house, 14, 2020-05-05, > "than 70 days" -> more than 70 days

       

      age_of_account is the calculated bin column

      want to change the bins as listed

      and then want to put into line and stacked column chart with

       

      month(date_opened) as the shared axis

      age_of_account as the column series

      count of accounts as the column values

       

      however it isn't letting me put the measure in the column series position.

      I don't have the option to create a table or a calculated column

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        I really do not understand.  Share data in a format that can be pasted in an MS Excel workbook.  Also, show the expected result clearly in a Table format.