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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
MrsPickles
Regular Visitor

Double Data - how to correct this?

Hi,

 

I have a Google Analytics property where screenPageviews were incorrectly collected twice for a month (July 2023).

I'd like to write a measure for this that divides any data collected in July 2023 by 2. Can this be done?

 

Sum of sessionsYearMonthSum of screenPageViews
103692022December14767
389322023January57066
418142023February60988
450782023March70015
372822023April57623
465902023May71989
476252023June72501
448552023July161193
444242023August95980
400922023September56805
464532023October64432
488682023November66279
379592023December52305
498572024January69268
180782024February24514
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MrsPickles ,

If you only need to modify the data in the column Sum of screenPageViews, you can try this:

New = 
IF(
    'Table'[Year] = 2023 && 'Table'[Month] = "July",
    'Table'[Sum of screenPageViews] / 2,
    'Table'[Sum of screenPageViews]
)

The final output is as below:

vjunyantmsft_0-1707702311192.png

But if you need to modify multiple columns of data, that may be more convenient in Power Query.

Best Regards,
Dino Tao
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

3 REPLIES 3
MrsPickles
Regular Visitor

Thanks for both your help. I went with the following after I received more info from the data owner. Double data collected from July 23 to 10 August 23 so I needed to identify each day.

In my date column (dd/mm/yyy) I extraced to a new column day of the month (PVDay), month name (PVMonth) and Year (PVYear).

Then I just nested a bunch of IF statements. There's probably a much cleaner way tro do this bit I couldn't get DATEBETWEEN to work and needed to move on:

 

Pageviews =

IF(

    'Table'[Year] = 2023 && 'Table'[PVMonth] = "July",

    'Table'[screenPageViews] / 2,

    IF(

        'Table'[Year] = 2023 && 'Table'[PVMonth] = "August" && 'Table'[PVDay] = 1,

        'Table'[screenPageViews] / 2,

        IF(

        'Table'[Year] = 2023 && 'Table'[PVMonth] = "August" && 'Table'[PVDay] = 2,

        'Table'[screenPageViews] / 2,

        IF(

        'Table'[Year] = 2023 && 'Table'[PVMonth] = "August" && 'Table'[PVDay] = 3,

        'Table'[screenPageViews] / 2,

        IF(

        'Table'[Year] = 2023 && 'Table'[PVMonth] = "August" && 'Table'[PVDay] = 4,

        'Table'[screenPageViews] / 2,

        IF(

        'Table'[Year] = 2023 && 'Table'[PVMonth] = "August" && 'Table'[PVDay] = 5,

        'Table'[screenPageViews] / 2,

        IF(

        'Table'[Year] = 2023 && 'Table'[PVMonth] = "August" && 'Table'[PVDay] = 6,

        'Table'[screenPageViews] / 2,

        IF(

        'Table'[Year] = 2023 && 'Table'[PVMonth] = "August" && 'Table'[PVDay] = 7,

        'Table'[screenPageViews] / 2,

        IF(

        'Table'[Year] = 2023 && 'Table'[PVMonth] = "August" && 'Table'[PVDay] = 8,

        'Table'[screenPageViews] / 2,

        IF(

        'Table'[Year] = 2023 && 'Table'[PVMonth] = "August" && 'Table'[PVDay] = 9,

        'Table'[screenPageViews] / 2,

        IF(

        'Table'[Year] = 2023 && 'Table'[PVMonth] = "August" && 'Table'[PVDay] = 10,

        'Table'[screenPageViews] / 2,

    'Table'[screenPageViews])

))))))))))

Anonymous
Not applicable

Hi @MrsPickles ,

If you only need to modify the data in the column Sum of screenPageViews, you can try this:

New = 
IF(
    'Table'[Year] = 2023 && 'Table'[Month] = "July",
    'Table'[Sum of screenPageViews] / 2,
    'Table'[Sum of screenPageViews]
)

The final output is as below:

vjunyantmsft_0-1707702311192.png

But if you need to modify multiple columns of data, that may be more convenient in Power Query.

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Daniel29195
Super User
Super User

@MrsPickles 

you have multiple waya of dealing with this : 
you can use switch in the measure : 

sumx( 

Addcolumns ( 

summarize( 

tbl_name , 

tbl_name[year] , 

tbl_name[month] 

) , 

"@sessions" , 

var y = tbl_name[year] 

var m = tbl_name[month] 

return

switch ( 

true(), 

Y = 2023 && m = july , calculate(sum(sessions))/2 , 

calculate(sum(sessions) ) 

)) , [@sessions] 

)


you can divide all the rows where 2023 july by 2 in power query for all the facts 

 

 

let me know if it works for you. 

 

 

if it does, kindly mark it as the accepted solution as this will help others in the community find it more easily. 

 

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors