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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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

Top Solution Authors