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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
saud968
Memorable Member
Memorable Member

Comparsion Chart

I have prepared a visual for the Current Year vs the Previous Year with the help of this YouTube video - https://www.youtube.com/watch?v=W_oW68T98IE

saud968_0-1709286977160.png

 

However, when trying monthly i cannot view January data

saud968_1-1709287002252.png

Previous Month Chat Case Count = CALCULATE ( [Chat Case Count], FILTER ( Query1, Query1[Chat-NonChat Flag] = "Chat" && YEAR(Query1[DATE_ENTERED_SR_EST]) = YEAR(TODAY()) && MONTH(Query1[DATE_ENTERED_SR_EST]) = MONTH(TODAY()) - 1 ) )

Chat CM vs PM = [Current Month Chat Case Count] - [Previous Month Chat Case Count]

Current Month Chat Case Count = CALCULATE ( [Chat Case Count], FILTER ( Query1, Query1[Chat-NonChat Flag] = "Chat" && YEAR(Query1[DATE_ENTERED_SR_EST]) = YEAR(TODAY()) && MONTH(Query1[DATE_ENTERED_SR_EST]) = MONTH(TODAY()) ) )


@amitchandak @Idrissshatila @Ritaf1983 @Fowmy @Ahmedx Please help

3 REPLIES 3
Anonymous
Not applicable

Hi @saud968 ,

 

The formula you are using for the Previous Month Chat Case Count might not account for the scenario when the current month is January.

 

Please try:

Previous Month Chat Case Count = 
CALCULATE(
    [Chat Case Count],
    FILTER(
        Query1,
        Query1[Chat-NonChat Flag] = "Chat" &&
        YEAR(Query1[DATE_ENTERED_SR_EST]) = IF(MONTH(TODAY()) = 1, YEAR(TODAY()) - 1, YEAR(TODAY())) &&
        MONTH(Query1[DATE_ENTERED_SR_EST]) = IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) - 1)
    )
)

 

I would be grateful if you could provide me with sample data with the personal information erased.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

This did not work, I will soon share the sample data for the same. However, it might take sometime. 

saud968
Memorable Member
Memorable Member

saud968_0-1709291441605.png

After refreshing the data I can see March data but not Jan whereas there is data in Jan

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.