Forum Discussion

AlanP514's avatar
AlanP514
Post Patron
4 years ago

Dynamic Title Based on versions

Hai All, I need your support on this 
Scenario: I  working on a sales report,

In the Version (top) you can see the latest version and the bottom red line(previous version)
I want to create a  dynamic title based on these
The output should be dynamic For eg: The latest version is  V6-June-2021 And the Previous Is V5-May-2021
So I want to set a dynamic title based on these versions 
Output = Sales Forecast Trend by Volume -[V6-June-2021 vs V5-May-2021]
If the user sends a new version next month(V7-July-2021) so the output should be [V7-June-2021 vs V6-June-2021]
Thanks 
Alan

Note: In this table has a column called forecast version 

So every month if new version appended in this column will reflect

2 Replies

  • AlanP514 ,

     

    Create a new column in DAX (on in power query)

     

    Date = datevalue(right([version], len([version]-1) )

     

    Now create a rank

    Rank  = rankx(Table, [Date],,desc, dense)

     

    now

    flag for latest

    if([Rank] =1 1, "Latest", [Rank])

     

    these column can be used Rank can also used to find by adding +1

     

    refer examples, I have used -1 as I have desc rank (Custom Period)

     

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

  • Thanks for the solution, but could you please mention the  Dax to create a dynamic title based on a measure which you created now 
    output 
    Sales Forecast Trend by Volume -[V6-June-2021 vs V5-May-2021]