Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Get previous month text values

    Posted Aug 08, 2022 05:39 AM

    Hi guys,

     

    I have a query that I simply cannot solve.

    I have a dataset that has values per month. In order to compare values to last months values I am trying to create a calculated measure. I tried using a column but it just won't work with my current logic.

    Here is the measure:

    Measure = if(HASONEVALUE(Users[JoinUsers]),CALCULATE(VALUES(Users[Company]),

    USERELATIONSHIP(Users[FirstOfMonth],'Date'[Date]),

    FILTER(ALL('Date'), 'Date'[Date] = PREVIOUSMONTH(Users[FirstOfMonth]))), convert(COUNT(Users[JoinUsers]),STRING))

     

    I created a calculated table containing only Users, company and date(first of month). This table is joined to date table on table[firstofmonth] = date[date].

    The unique key is: User_Company_Date

     

    The desired outcome would be:

    User

    Company

    Prev Company

    Date

    User1

    Cmp1

    Cmp1

    1/1/2022

    User2

    Cmp1

    Cmp2

    1/1/2022

     

    Please can someone point me in the right direction?

     

    Cheers,

    Lilja

    Wichtiger Hinweis: Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.

    Important Note: This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.


  • 2.  RE: Get previous month text values

    Posted Aug 26, 2022 02:48 AM

    Hi Lilja,

    If calculated column is fine with you rather than a new measure in the visual, you may try the below:

    Regards,

    RD



    ------------------------------
    Rd 3nidad
    Senior Finance Analyst
    ------------------------------