Forum Discussion

FP68's avatar
FP68
Icon for Helper I rankHelper I
5 months ago

How to add an indicator

Hello,

I’m trying to set an indicator on a Matrix.
It is composed from a History table that has a column with the name of a site (JV), a month (Month) and a volume (VolumeGo)
So i have one line per month for each site.
I want it to be indicated for the last 2 known months if the volume has increased or not. We can very well say that the last known month is the current month -1
I tried with a calculated column but I can’t manage
Thank you for your help

14 Replies

  • Add Month Offset calculated column:

    Month Offset = DATEDIFF(TODAY(), History[Month], MONTH)

    Measure for indicator:

     
    Trend Indicator = 
    VAR CurrentVol = [VolumeGo]
    VAR PrevVol =
    CALCULATE(
    [VolumeGo],
    FILTER(History, History[Month Offset] = MAX(History[Month Offset]) + 1)
    )
    RETURN
    IF(CurrentVol > PrevVol, "↑", IF(CurrentVol < PrevVol, "↓", "→"))

     

  • Hi FP68

    please include, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Alternatively, you can share your .pbix via some cloud service and paste the link here. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.

     

    Need help uploading data? click here

     

    Want faster answers? click here

  • Hi,

     

    The table Historique is:

     

    JVWeekCategorieVolume
    JVITjanv-26Between 3Y and 90D3,51E+12
    JVFRjanv-26Between 3Y and 10Y3,19E+12
    JVFRjanv-26Between 3Y and 90D3,18E+12
    JVUKjanv-26Between 3Y and 90D1,65E+12
    JVITjanv-26Between 3Y and 10Y1,55E+12
    HQFRjanv-26Between 3Y and 90D1,37E+12
    JVPLjanv-26Between 3Y and 90D1,17E+12
    JVDEjanv-26Between 3Y and 90D9,05E+11
    JVUKjanv-26Between 3Y and 10Y8,14E+11
    JVITjanv-26Less than 90D7,62E+11
    JVFRjanv-26Less than 90D7,42E+11
    HQFRjanv-26Between 3Y and 10Y7,32E+11
    JVNLjanv-26Between 3Y and 90D6,83E+11
    JVBEjanv-26Between 3Y and 90D6,22E+11
    JVAUjanv-26Between 3Y and 10Y5,77E+11
    JVFRjanv-2610Y and more5,26E+11
    JVPLjanv-26Between 3Y and 10Y4,85E+11
    HQFRjanv-2610Y and more3,76E+11
    JVBEjanv-26Between 3Y and 10Y3,76E+11
    JVAUjanv-26Between 3Y and 90D3,47E+11
    JVUKjanv-26Less than 90D2,75E+11
    JVDEjanv-26Between 3Y and 10Y2,71E+11
    JVAUjanv-2610Y and more2,20E+11
    ASSUjanv-26Between 3Y and 90D1,71E+11
    JVDEjanv-26Less than 90D1,69E+11
    JVPLjanv-26Less than 90D1,65E+11
    HQFRjanv-26Less than 90D1,65E+11
    JVBEjanv-26Less than 90D1,60E+11
    ASSUjanv-26Between 3Y and 10Y1,17E+11
    JVPLjanv-2610Y and more1,12E+11
    JVNLjanv-26Between 3Y and 10Y1,03E+11
    JVITjanv-2610Y and more76996742060
    JVAUjanv-26Less than 90D73581114642
    ASSUjanv-26Less than 90D34920870358
    JVNLjanv-26Less than 90D19587381952
    JVPLfeb-26Less than 90D1,54E+11
    HQFRfeb-26Less than 90D1,45E+11
    JVESfeb-26Less than 90D1,33E+11
    ASSUfeb-26Between 3Y and 10Y1,19E+11
    JVPLfeb-2610Y and more1,12E+11
    JVESfeb-26Between 3Y and 90D1,10E+11
    JVNLfeb-26Between 3Y and 10Y1,09E+11
    JVITfeb-2610Y and more76996775905
    JVAUfeb-26Less than 90D60576955829
    ASSUfeb-26Less than 90D34737386824
    JVUKfeb-2610Y and more17182813778
    JVNLfeb-26Less than 90D16185336043
    JVDEfeb-2610Y and more11820054632
    JVNLfeb-2610Y and more11818724777
    JVBEfeb-2610Y and more7441209608
    JVESfeb-26Between 3Y and 10Y5955133014
    JVESfeb-2610Y and more18518367
    JVFRfeb-26Between 3Y and 90D3,26E+12
    JVFRfeb-26Between 3Y and 10Y3,24E+12
    JVFRfeb-26Less than 90D6,72E+11
    JVFRfeb-2610Y and more5,26E+11

     

    The matrix:

     

    The result:

    -cell in red or green for the last month if upgrade/downgrade

    - a colored arrow
    I haven't a preference

    Thanks

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi FP68 ,

     

    Thank you Kedar_Pande  for the response provided!

    Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.

    Thank you.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi FP68 ,


      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.

      • FP68's avatar
        FP68
        Icon for Helper I rankHelper I

        Hi ,
        For the moment I haven't a solution.
        Regards