Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Kerensky34
New Member

Display Current Month in Table Visualization

I have the data in the following table 

data.PNG

But I want the table Visualization to only show the Current and NOT the average of the other Months with out a filter
This is avegrage of 4 moths but should only display current Month


Average.PNG

1 ACCEPTED SOLUTION

Hi  @Kerensky34 ,

You can create one measure for it just like the one in below screenshot. And I just create one sample PBIX file, you can find full details in it.

Display Current Month in Table Visualization.JPG

CurrentMonth =

VAR a =

    IF (

        YEAR ( MAX ( 'Product Info'[Record Month] ) ) = YEAR ( TODAY () )

            && MONTH ( MAX ( 'Product Info'[Record Month] ) ) = MONTH ( TODAY () ),

        MAX ( 'Product Info'[Record Month] ),

        BLANK ()

    )

VAR b =

    CALCULATE (

        MAX ( 'Product Info'[Record Month] ),

        FILTER ( 'Product Info', NOT ( ISBLANK ( a ) ) )

    )

RETURN

b

 

If the above measure formula is not applicable in your scenario, please provide the related table structure and some sample data(exclude sensitive data).

 

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Hi @Kerensky34

I'm not very clear about your requirement. What is your expected results? Could you please provide some samples? If the record in below screenshot is that you want to display on the table visual in the end?

expected result.JPG

 

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yiruan-msft
Correct that the record I would like to display on the table visual

Hi  @Kerensky34 ,

You can create one measure for it just like the one in below screenshot. And I just create one sample PBIX file, you can find full details in it.

Display Current Month in Table Visualization.JPG

CurrentMonth =

VAR a =

    IF (

        YEAR ( MAX ( 'Product Info'[Record Month] ) ) = YEAR ( TODAY () )

            && MONTH ( MAX ( 'Product Info'[Record Month] ) ) = MONTH ( TODAY () ),

        MAX ( 'Product Info'[Record Month] ),

        BLANK ()

    )

VAR b =

    CALCULATE (

        MAX ( 'Product Info'[Record Month] ),

        FILTER ( 'Product Info', NOT ( ISBLANK ( a ) ) )

    )

RETURN

b

 

If the above measure formula is not applicable in your scenario, please provide the related table structure and some sample data(exclude sensitive data).

 

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

Not very clear with desc. But the following can give month Avg. Make sure you have date dimension

MTD Sales = CALCULATE([pct],DATESMTD('Date'[Date]))
MTD Sales = CALCULATE(average([pct]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE([pct],DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last MTD (complete) Sales =  CALCULATE([pct],DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
last year MTD (complete) Sales =  CALCULATE([pct],DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.