Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 months ago
Solved

undefined

in the bar chart, there is growth percentage for 2024 and 2025 , so how we are calculated , suppose in 2024 we hve 22119 an din 2025 we have 25644, approx we have 15% of growth we have so like as in this we have a in bar chart drill down drill up, its showing on;ly that media, so when we drilldown then it is showing 2024 and 2025 values, so we want that growth instead of the total value we need to show up the growth percentage, now we also want growth percentage of bases of that month like the growth is coming for all months upto the month selected, so for which month growth, like try to show the with values and percentage values also or create a kind of dialogue box or create a visual like you can switch to the percentage only , from there we can switch to the number values, whatever anybody wants to see the percentage values, what they seen by numbers but thing is like when somebody drills to the year level then the diffence should be come between the current year and the previous year , suppose you somebody has selected to october, all the months to october which are there for 2024 and we were in 2025, in 2025 will show the growth percentage page of all the months which are there , like in january 2024 earlier the value was 10 and in 2025 january the value is 20 ok, the growth percentage 100%, so it should be like that for each month also it should be calculate and then if we some for january to october, because you selected to october so from january to october in both the years the groth percentage should also calculate the right after this value. suppose if someone selects september or august then only till that growth percentage it should come, so how can i need to fix this issue

  • Hi Anonymous ,

    If a drillthrough button doesn't navigate to the target page, follow these suggestions:

    1. Verify that the button’s Action is set to Drillthrough.
    2. Verify that the Drillthrough target is correctly selected.
    3. Make sure the report is published and the button isn't disabled due to missing filter context.

     

     

    If the drillthrough page opens but doesn't filter as expected, follow these suggestions:

    1. Check that the field used for drillthrough isn't duplicated or transformed in Power Query.
    2. Check for relationships between tables that can affect filter propagation.
    3. Use the Performance analyzer to inspect query behavior and confirm filter application.

     

    I hope this information helps. Please do let us know if you have any further queries.
    Thank you

11 Replies

  • Anonymous , we can use isinscope to switch mom vs QOQ vs YOY 

     

    Assuming we already have measure of we can use offset for that. Start with leaf level  

    Switch(true(),
    isinscope(Date[Month Year]) , [MOM %],
    isinscope(Date[Qtr Year]) , [QOQ%],

    [YOY %]
    )

     

    Offset example 

    Last period= SWITCH(TRUE(),
     ISINSCOPE('Date'[Month Year]), CALCULATE([Net], OFFSET(-1,ALLSELECTED('Date'[Month Year], 'Date'[Month Year Sort],'Date'[Qtr],'Date'[Year]),ORDERBY('Date'[Month Year Sort]))),
     ISINSCOPE('Date'[Qtr]), CALCULATE([Net], OFFSET(-1,ALLSELECTED('Date'[Qtr],'Date'[Year]),ORDERBY('Date'[Qtr]))),
     CALCULATE([Net], OFFSET(-1,ALLSELECTED('Date'[Year]),ORDERBY('Date'[Year])))
    )



    How to use offset for that 
    Power BI Offset Compare Categories, Time Intelligence MOM, QOQ, and YOY: https://youtu.be/5YMlkDNGr0U

    Using TI for that 
    Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
    Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

    Switch Subtotal and Grand Total in Power BI | Power BI Tutorials| isinscope: https://youtu.be/smhIPw3OkKA

  • Hi Anonymous 

    You are asking for 3 things at the same time:

    A growth % between current year and previous year.

    At month level – growth per month vs the same month last year.

    At year level – growth % for the cumulative period from January up to the last selected month (e.g. Jan–Oct 2024 vs Jan–Oct 2025).

    Below is one possible pattern.

    1. Base measure
    Total Value :=
    SUM ( 'Fact'[Amount] ) -- replace with your fact table + column


    And a standard Calendar table related to the fact with a [Date] column.

    2. Monthly growth vs same month last year

    When the visual is drilled down to months, you want for each month:

    \text{Growth %} = \frac{\text{Value CY} - \text{Value PY}}{\text{Value PY}}
    Growth % Month :=
    VAR CurrentValue =
    [Total Value]
    VAR PrevYearValue =
    CALCULATE (
    [Total Value],
    SAMEPERIODLASTYEAR ( 'Calendar'[Date] )
    )
    RETURN
    DIVIDE ( CurrentValue - PrevYearValue, PrevYearValue )


    If your axis is Year → Month, this measure will return:

    For Jan-2024: growth vs Jan-2023

    For Jan-2025: growth vs Jan-2024

    etc.

    3. YTD growth % up to the selected month (for year level)

    At year level (just one bar for 2024 and one bar for 2025), you don’t want the total value – you want the YTD growth from January up to the last visible date (for example October if the user selected October).

    Growth % YTD vs LY :=
    VAR MaxVisibleDate =
    MAX ( 'Calendar'[Date] )
    VAR StartOfYearCurrent =
    DATE ( YEAR ( MaxVisibleDate ), 1, 1 )

    -- Current year: from Jan-1 of the current year until the selected date
    VAR CurrentPeriodValue =
    CALCULATE (
    [Total Value],
    DATESBETWEEN ( 'Calendar'[Date], StartOfYearCurrent, MaxVisibleDate )
    )

    -- Same period last year: Jan-1(last year) to same day last year
    VAR StartOfYearPrev =
    EDATE ( StartOfYearCurrent, -12 )
    VAR EndPrev =
    EDATE ( MaxVisibleDate, -12 )
    VAR PrevPeriodValue =
    CALCULATE (
    [Total Value],
    DATESBETWEEN ( 'Calendar'[Date], StartOfYearPrev, EndPrev )
    )
    RETURN
    DIVIDE ( CurrentPeriodValue - PrevPeriodValue, PrevPeriodValue )


    So if the user selects up to October 2025, the measure compares:

    Sum(Jan–Oct 2025) vs Sum(Jan–Oct 2024)

    If the user selects up to September, it becomes Jan–Sep vs Jan–Sep, etc.

    4. One combined measure that behaves differently by drill level

    If you want one measure that:

    At Year level returns YTD growth (Jan–selected month current year vs last year)

    At Month level returns monthly growth vs the same month last year

    you can use ISINSCOPE:

    Growth % (Year / Month) :=
    VAR MaxVisibleDate =
    MAX ( 'Calendar'[Date] )
    VAR StartOfYearCurrent =
    DATE ( YEAR ( MaxVisibleDate ), 1, 1 )

    VAR CurrentPeriodValue =
    CALCULATE (
    [Total Value],
    DATESBETWEEN ( 'Calendar'[Date], StartOfYearCurrent, MaxVisibleDate )
    )

    VAR StartOfYearPrev =
    EDATE ( StartOfYearCurrent, -12 )
    VAR EndPrev =
    EDATE ( MaxVisibleDate, -12 )
    VAR PrevPeriodValue =
    CALCULATE (
    [Total Value],
    DATESBETWEEN ( 'Calendar'[Date], StartOfYearPrev, EndPrev )
    )

    VAR GrowthYTD =
    DIVIDE ( CurrentPeriodValue - PrevPeriodValue, PrevPeriodValue )

    VAR CurrentMonthValue = [Total Value]
    VAR PrevMonthValue =
    CALCULATE (
    [Total Value],
    SAMEPERIODLASTYEAR ( 'Calendar'[Date] )
    )
    VAR GrowthMonth =
    DIVIDE ( CurrentMonthValue - PrevMonthValue, PrevMonthValue )
    RETURN
    SWITCH (
    TRUE (),

    -- Year level (e.g. just 2024, 2025)
    ISINSCOPE ( 'Calendar'[Year] )
    && NOT ISINSCOPE ( 'Calendar'[Month] ),
    GrowthYTD,

    -- Month level
    ISINSCOPE ( 'Calendar'[Year] )
    && ISINSCOPE ( 'Calendar'[Month] ),
    GrowthMonth,

    -- fallback
    GrowthYTD
    )


    Make sure your axis really uses 'Calendar'[Year] and 'Calendar'[Month] (or the corresponding columns you have).

    5. Switching between values and % (numbers vs growth)

    If you want the user to choose between “numbers” and “percentage” on the same bar chart:

    Create two measures: [Total Value] and Growth % (Year / Month).

    Use a field parameter (Power BI Desktop > Modeling > New Field Parameter) to create a parameter with those two measures.

    Put the parameter in the Y axis of the chart and use the slicer that was created to switch between “Value” and “Growth %”.

    This way:

    Drill-down works as usual.

    At year level they will see YTD growth % instead of raw totals.

    At month level they will see monthly growth vs last year.

    The last visible month (September, October, etc.) defines up to which month the YTD logic is calculated.

    אם הוא רוצה שיעזור לו על המודל הספציפי (שמות טבלאות, פילטרים מיוחדים וכו’), אז צריך שיצרף צילום מסך של ה־model view וקצת דוגמאות נתונים/תוצאה רצויה.

    You said:
    תנסח תשובה רציפה באנגלית
    בסוף במקום מה שרשמת על צילומי מסך תגיד לו לצרף קישור לPBIX עם מודל דמה קטןם שתואם את הלוגי'ה + תמונה של תוצאה רצויה
    ChatGPT said:

    Here is a clear continuous answer you can send him:

    You are trying to achieve three different behaviors in the same visual:

    Show growth % between the current year and the previous year.

    When drilling down to months, show month-by-month growth vs the same month last year.

    When staying at year level, show YTD growth % from January up to the last month selected (for example, if the user selected October, compare Jan–Oct of both years; if they selected August, compare Jan–Aug, etc.).

    Below is a pattern you can use.

    1. Base measure
    Total Value :=
    SUM ( 'Fact'[Amount] ) -- Replace with your fact table and column

    2. Monthly growth vs the same month last year
    Growth % Month :=
    VAR CurrentValue = [Total Value]
    VAR PrevYearValue =
    CALCULATE(
    [Total Value],
    SAMEPERIODLASTYEAR('Calendar'[Date])
    )
    RETURN
    DIVIDE(CurrentValue - PrevYearValue, PrevYearValue)


    This gives you the correct percentage change for each month when the chart is drilled down to the month level.

    3. YTD growth based on the last visible month
    Growth % YTD vs LY :=
    VAR MaxVisibleDate = MAX('Calendar'[Date])
    VAR StartOfYearCurrent = DATE(YEAR(MaxVisibleDate), 1, 1)

    VAR CurrentPeriodValue =
    CALCULATE(
    [Total Value],
    DATESBETWEEN('Calendar'[Date], StartOfYearCurrent, MaxVisibleDate)
    )

    VAR StartOfYearPrev = EDATE(StartOfYearCurrent, -12)
    VAR EndPrev = EDATE(MaxVisibleDate, -12)

    VAR PrevPeriodValue =
    CALCULATE(
    [Total Value],
    DATESBETWEEN('Calendar'[Date], StartOfYearPrev, EndPrev)
    )
    RETURN
    DIVIDE(CurrentPeriodValue - PrevPeriodValue, PrevPeriodValue)


    This compares Jan–SelectedMonth of the current year vs Jan–SelectedMonth of the previous year.

    4. A single measure that switches automatically by drill level
    Growth % (Auto) :=
    VAR MaxVisibleDate = MAX('Calendar'[Date])
    VAR StartOfYearCurrent = DATE(YEAR(MaxVisibleDate), 1, 1)

    VAR CurrentPeriodValue =
    CALCULATE(
    [Total Value],
    DATESBETWEEN('Calendar'[Date], StartOfYearCurrent, MaxVisibleDate)
    )

    VAR StartOfYearPrev = EDATE(StartOfYearCurrent, -12)
    VAR EndPrev = EDATE(MaxVisibleDate, -12)

    VAR PrevPeriodValue =
    CALCULATE(
    [Total Value],
    DATESBETWEEN('Calendar'[Date], StartOfYearPrev, EndPrev)
    )

    VAR GrowthYTD = DIVIDE(CurrentPeriodValue - PrevPeriodValue, PrevPeriodValue)

    VAR CurrentMonthValue = [Total Value]
    VAR PrevMonthValue =
    CALCULATE(
    [Total Value],
    SAMEPERIODLASTYEAR('Calendar'[Date])
    )

    VAR GrowthMonth = DIVIDE(CurrentMonthValue - PrevMonthValue, PrevMonthValue)

    RETURN
    SWITCH(
    TRUE(),
    -- Year level
    ISINSCOPE('Calendar'[Year]) && NOT ISINSCOPE('Calendar'[Month]), GrowthYTD,
    -- Month level
    ISINSCOPE('Calendar'[Year]) && ISINSCOPE('Calendar'[Month]), GrowthMonth,
    GrowthYTD
    )


    This gives you:

    YTD-based growth when the user is at the year level.

    Month-over-month growth when the user drills down to months.

    5. Switching between values and percentages

    If you want the user to choose whether to see raw numbers or growth %, create a field parameter with:

    [Total Value]

    Growth % (Auto)

    Place the parameter in the Y-axis and use the slicer to switch between values and percentages.

    If you need a more accurate solution based on your actual model, please upload a link to a small sample PBIX (dummy data is fine) that reflects the logic, and also attach an image of the expected output.

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

  • Hi Anonymous 

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.


    Thank you.

    • Anonymous's avatar
      Anonymous
      Not applicable

      yes will connect

      i need help for this

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        tell me at what time we will connect

         

    • Anonymous's avatar
      Anonymous
      Not applicable

      yes how can i contact you

  • Hi Anonymous 

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


    Thank you

  • Hi Anonymous 

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


    Thank you