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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
smoorthy
Regular Visitor

Calculate the difference between the count of 2 GA4 events on an area chart

Hi,

 

I have a stacked area chart that shows the usage trends of two GA4 events with their event count for the past 12 months, with count as Y axis and year-month as x axis. These two events are on the legend. Now I want another parameter(new event) on the graph which is basically the subtraction of these two specfic GA4event counts. I thought this should be as simple as New value = GA4eventcount1 - GA4eventcount2, but when I try the visual calculation it is not as simple. When I try to enter the formula for calculation it doesn't let me select the specific event name counts to subtract. Not sure how to get this new value.

 

Any help/suggestion is welcome appreciated.

Thank you

2 REPLIES 2
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

smoorthy_0-1741887816810.png

This is a sample of how the graph looks on Powerbi. I am using GA4 events and their event count for the data. I want a new event/parameter which calculates the difference betwen Photos Clicked and Photos Edited. When I try to do this using Visual calculation, I can't seem to do this.

 

Sample Data below with Expected Outcome

 

Event Name

Photos clickedPhotos EditedPhotos clicked - Photos Edited
Month-YearEvent CountEvent count 
2024-111009010
2024-1230025050
2025-125022030
2025-240038020

 

 

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Users online (27)