Forum Discussion

adamsumm's avatar
adamsumm
Frequent Visitor
8 years ago
Solved

Creating a Card for displaying the previous months count

Hello,   I need to create two cards and a month slicer in my dashboard.  One card needs to coordinate with the month slicer and show me the current count of calls in that month.  The other card nee...
  • v-jiascu-msft's avatar
    8 years ago

    Hi adamsumm,

     

    The column opened_at contains time parts that isn't necessary in this scenario. The most important point is the time part is bad for the relationship.

    1. Create a new column:

    Relationship = [Opened_at].[Date]

    2. Establish relationship between this table and the date table.

    3. Two measures.

     

    CurrentMonthAmount = count(Table1[Number])
    PreviousMonthAmount =
    VAR currentAmount =
        COUNT ( Table1[Opened_at] )
    VAR previousAmount =
        CALCULATE ( COUNT ( 'Table1'[Opened_at] ), PREVIOUSMONTH ( 'Calendar'[Date] ) )
    RETURN
        IF (
            previousAmount < currentAmount,
            CONCATENATE ( previousAmount, UNICHAR ( 9660 ) ),
            IF (
                previousAmount > currentAmount,
                CONCATENATE ( previousAmount, UNICHAR ( 9650 ) ),
                previousAmount
            )
        )

     

     

     

     

     

     

     

     

     

     

     

    Best Regards!

    Dale