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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
netanel
Post Prodigy
Post Prodigy

Daily AVG

Hi All,

Tricky problem
I am trying to create a daily average for IAA Amount
The problem is that I don't really have 31 days in the data but I have the number 31, Only in one row under column "Prev_Month_Days"

Can I say in the formula that if there is the number 31 in the row or 28 then divide by that number?

 

Thanks!

 

2022-08-18_08-11-50.png








Did I answer your question?
Mark my post as a solution!
Appreciate your Kudos!

Connect on Linkedin
linkedin.com/in/netanel-shriki
1 ACCEPTED SOLUTION

Hi,

Please try writing the below measure and put it into the same visualization whether it suits your requirement.

 

AVG IAA = 
DIVIDE( [IAA 40_BT40002 Revenues_Ads], SELECTEDVALUE( Dim_Time[Current_Month_Days]) )

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

6 REPLIES 6
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please try using CONVERT function in order to convert text type to number type in a measure.

Thanks. 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


@Jihwan_Kim Thanks for the response

I fix the question
The problem is not in text or number format
The problem is dividing by 31 or 28 depending on what is written in the "Prev_Month_Days" column








Did I answer your question?
Mark my post as a solution!
Appreciate your Kudos!

Connect on Linkedin
linkedin.com/in/netanel-shriki

Hi,

Thank you for your feedback.

Sorry that it is difficult for me to know how the column [Prev_Month_Days] looks like.

Could you please share the sample pbix file with how the expected numbers look like?

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


@Jihwan_Kim 

I tried to make it as clear as possible, thanks!

Here you have the simple file:

https://1drv.ms/f/s!AonyYI-TdspHgUhwngZ6OKvpnSsc








Did I answer your question?
Mark my post as a solution!
Appreciate your Kudos!

Connect on Linkedin
linkedin.com/in/netanel-shriki

Hi,

Please try writing the below measure and put it into the same visualization whether it suits your requirement.

 

AVG IAA = 
DIVIDE( [IAA 40_BT40002 Revenues_Ads], SELECTEDVALUE( Dim_Time[Current_Month_Days]) )

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


@Jihwan_Kim 

Oh man how did I not think of that

So simple so good
Thanks!








Did I answer your question?
Mark my post as a solution!
Appreciate your Kudos!

Connect on Linkedin
linkedin.com/in/netanel-shriki

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors