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
saud968
Responsive Resident
Responsive Resident

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
v-huijiey-msft
Community Support
Community Support

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
Responsive Resident
Responsive Resident

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
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.