Forum Discussion

vrv's avatar
vrv
Helper II
1 year ago
Solved

YOY visualization question

hi all,

I am having difficulties with displaying two diffrent series in the same visualization.

I am trying to have a column chart with the first set based on a global fiilter that picks readings from a table for a date range between Jan 1st current year and the current date and the second set based on a date range between Jan 1st current year - 1 year and current date - 1 year. Namely, two colums will show: the first one whatever the metric is for the current year up to the current date and the second column will show the same etric for the same period the last year.

In my setting, the chart has a monthly breakdown, so I have a column for each month and some partial result for the current month.

For today, for instance, I should see a column for Jan 1st to Jan 31st 2025 next to a column for Jan 1st to Jan 31st 2024, and so forth until the 4th column that shows the metric for April 1st to April 23rd 2025 and the next column April 1st to April 23rd 2024.

The table I am working with has a myDate date filed and a myBitField bit field. The metric I am displaying is a measure:

myMeasure1 =
VAR totalRows = COUNT('myDataSet'[Id])
VAR trueRows =
  CALCULATE (
    COUNTROWS('myDataSet'),
    'myDataSet'[myBitField] = TRUE()
  )
RETURN DIVIDE(trueRows,totalRows)
 
So, the goal is to have a column chart that displays these percentages for the current year (broken down by month) and for the last year.
Thank you for your help, please let me know if you have any questions.
vrv

9 Replies

  • Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
    Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
    Please show the expected outcome based on the sample data you provided.

    Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

    • vrv's avatar
      vrv
      Helper II

      lbendlin,

      thank you for your initial reply, my sample does not want to get into a table. I am still trying to figure out why is the error message saying that it cannot accept more than 20,000 characters when Word says I have 8,000 characters.

      The visualization I am looking for is below:

      I will try to get a very small sampleand will try again.

      Thank you again,

      Regards,

      vrv

    • vrv's avatar
      vrv
      Helper II
      IDmyDate(Year)myDate(Quarter)myDate(Month)myDate(Day)myBitField
      12024Q1Jan11
      22024Q1Jan21
      32024Q1Jan30
      42024Q1Jan40
      52024Q1Jan50
      322024Q1Feb11
      332024Q1Feb20
      342024Q1Feb31
      352024Q1Feb40
      362024Q1Feb50
      612024Q1Mar11
      622024Q1Mar21
      632024Q1Mar30
      642024Q1Mar41
      652024Q1Mar50
      922024Q2Apr11
      932024Q2Apr20
      942024Q2Apr30
      952024Q2Apr41
      1142024Q2Apr231
      1222024Q2May11
      1232024Q2May21
      1242024Q2May30
      1252024Q2May40
      1262024Q2May51
      1532024Q2Jun11
      1542024Q2Jun21
      1552024Q2Jun30
      1562024Q2Jun40
      1572024Q2Jun51
      1832024Q3Jul11
      1842024Q3Jul21
      1852024Q3Jul31
      1862024Q3Jul40
      1872024Q3Jul50
      2142024Q3Aug11
      2152024Q3Aug21
      2162024Q3Aug31
      2172024Q3Aug40
      2182024Q3Aug50
      2452024Q3Sep11
      2462024Q3Sep21
      2472024Q3Sep31
      2482024Q3Sep40
      2492024Q3Sep50
      2752024Q4Oct10
      2762024Q4Oct21
      2772024Q4Oct31
      2782024Q4Oct41
      2792024Q4Oct50
      3062024Q4Nov10
      3072024Q4Nov21
      3082024Q4Nov31
      3092024Q4Nov41
      3102024Q4Nov50
      3362024Q4Dec10
      3372024Q4Dec20
      3382024Q4Dec31
      3392024Q4Dec41
      3402024Q4Dec51
      3672025Q1Jan11
      3682025Q1Jan21
      3692025Q1Jan31
      3702025Q1Jan40
      3712025Q1Jan50
      4292025Q1Feb11
      4302025Q1Feb21
      4312025Q1Feb31
      4322025Q1Feb40
      4332025Q1Feb50
      4852025Q1Mar11
      4862025Q1Mar21
      4872025Q1Mar31
      4882025Q1Mar41
      4892025Q1Mar50
      5472025Q2Apr11
      5482025Q2Apr21
      5492025Q2Apr31
      5502025Q2Apr41
      5512025Q2Apr50
      5522025Q2Apr231
      • lbendlin's avatar
        lbendlin
        Super User

        The attached is only a rough draft.  What you really want is a proper calendar table in your data model.

         

         

  • vrv's avatar
    vrv
    Helper II

    Sorry,

    I have limited experience with the tool as well as with the forum. Let me prepare a dataset.

    Thank you for your reply,

    vrv 

    • V-yubandi-msft's avatar
      V-yubandi-msft
      Community Support

      Hi vrv ,

      Thank you for putting together and sharing the sample dataset.  A big thanks as well to lbendlin ,  for your ongoing and valuable contributions to the community.

       

      vrv , have you had a chance to review the PBIX file shared by lbendlin ? Based on your original question, the solution and explanation provided appear to address your requirements.

       

      If you need any further details or clarification, please don’t hesitate to reach out.

       

      If your issue has been resolved, kindly mark the reply as the Accepted Solution. Doing so will make it easier for other community members facing similar challenges to find helpful guidance.

       

      Regards,

      Yugandhar.

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Community Support

    Hi vrv ,

    Has your issue been resolved, or do you require any further information? Your feedback is valuable to us. If the solution was effective, please mark it as 'Accepted Solution' to assist other community members experiencing the same issue.

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Community Support

    Hi vrv ,

    We haven’t received a response yet and want to ensure the solution met your needs. If you need any further assistance, feel free to reach out we’d be happy to help. If everything is working as expected, kindly mark it as Accepted as solution.

     

    Thank You.

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Community Support

    Hi vrv ,

    Has your issue been resolved, or do you require any further information? Your feedback is valuable to us. If the solution was effective, please mark it as 'Accepted Solution' to assist other community members experiencing the same issue.