Forum Discussion

brookesmoore's avatar
brookesmoore
Frequent Visitor
3 years ago
Solved

Help with changing the text within a text box depending on the date/quarter/year filters

Hello All,   I have a series of cards aligned in a row displaying the sums of various revenue types. Each revenue type has its own column in the table and is linked to a date spanning from 1/1/2022...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi brookesmoore ,

    You can follow the steps below to get it, please find the details in the attachment.

    1. Create a measure as below

    Measure = 
    VAR _mindate =
        MIN ( 'Date'[Date] )
    VAR _maxdate =
        MAX ( 'Date'[Date] )
    RETURN
        IF (
            _maxdate < DATE ( 2023, 2, 1 ),
            0.98,
            IF ( _mindate >= DATE ( 2023, 2, 1 ), 0.94, BLANK () )
        )

    2. Create a card visual to replace the textbox

    Best Regards

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi brookesmoore ,

    You can make a little adjustment on the measure as below, please find the details in the attachment.

    Measure =
    VAR _mindate =
        MIN ( 'Date'[Date] )
    VAR _maxdate =
        MAX ( 'Date'[Date] )
    RETURN
        IF (
            _maxdate < DATE ( 2023, 2, 1 ),
            0.98,
            IF ( _mindate >= DATE ( 2023, 2, 1 ), 0.94, "98%/94%" )
        )

    Best Regards