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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
reibalboaOMG
Helper I
Helper I

sum by rank and cpms

Hi everyone can somebody help me?

reibalboaOMG_1-1677646361592.png

here is my sample data 

in my  powerbi it already have a ranking 

reibalboaOMG_2-1677646427751.png

i need a formula that sum of all cpm by social platform and ranking, on the right screenshot the output will be 8872

2 ACCEPTED SOLUTIONS
reibalboaOMG
Helper I
Helper I

hi @FreemanZ,

i've filtered the social platform by FB and (all cost/post / all impression) * 1000
total computation of cost/post = 745,200

total computation of impression = 83,994

over all computation (cost:745,200/impression:83,994)*1000 = 8872 

my ranking is base on week of update 01/22 = 1, 01/29 = 2

rank 1 on FB will be 8872

reibalboaOMG_0-1677650101319.png

mine has the wrong output because i could'n figure out the right formula for this

 

View solution in original post

@reibalboaOMG 
Not sure what could go wrong. Even a simple DIVDE/SUM shall do the job unless your data model is more complex that just a single table. In case of mutiple periods or platforms selected you may use the following to obtain correct aggregation.

=
SUMX (
    SUMMARIZE ( 'Table', 'Table'[Social Platform], 'Table'[Rank] ),
    CALCULATE (
        DIVIDE ( SUM ( 'Table'[Cost/Post] ), SUM ( 'Table'[Post Impression] ) ) * 1000
    )
)

View solution in original post

4 REPLIES 4
reibalboaOMG
Helper I
Helper I

hi @tamerj1 and @FreemanZ  i have a new problem that i encountered

focus yourself to COST EFFICIENCIES

 

reibalboaOMG_0-1677829060720.png

youtube cpm has 5.97k on the first week

 

reibalboaOMG_1-1677829100409.png

on the second week it has 3.70k which has the right color but if the value did'nt move on the next week it should be red.

 

reibalboaOMG_2-1677829184832.png

cpmvalue = IF('Template (2)'[Postimpcpm] & MAX('Template (2)'[weekrank]) <= 'Template (2)'[Postimpcpm] & MIN('Template (2)'[weekrank]), "#CC6478", "#56AA93"
 
here is my field value formula^

 

 

reibalboaOMG
Helper I
Helper I

hi @FreemanZ,

i've filtered the social platform by FB and (all cost/post / all impression) * 1000
total computation of cost/post = 745,200

total computation of impression = 83,994

over all computation (cost:745,200/impression:83,994)*1000 = 8872 

my ranking is base on week of update 01/22 = 1, 01/29 = 2

rank 1 on FB will be 8872

reibalboaOMG_0-1677650101319.png

mine has the wrong output because i could'n figure out the right formula for this

 

@reibalboaOMG 
Not sure what could go wrong. Even a simple DIVDE/SUM shall do the job unless your data model is more complex that just a single table. In case of mutiple periods or platforms selected you may use the following to obtain correct aggregation.

=
SUMX (
    SUMMARIZE ( 'Table', 'Table'[Social Platform], 'Table'[Rank] ),
    CALCULATE (
        DIVIDE ( SUM ( 'Table'[Cost/Post] ), SUM ( 'Table'[Post Impression] ) ) * 1000
    )
)
FreemanZ
Super User
Super User

hi @reibalboaOMG 

not quite sure how do you get  8872, could you elaborate that?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

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

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.