Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I need helps as below:
I had tried to upload the pbix file, but fail.
Solved! Go to Solution.
Hi @PrizzC15 ,
I created some data:
Here are the steps you can follow:
1. Create measure.
sum divde =
var _selectYear=SELECTEDVALUE('Table'[Year])
var _selectmonthname=SELECTEDVALUE('Table'[Month Name])
var _month=MAXX(FILTER(ALL('Table'),'Table'[Year]=_selectYear&&'Table'[Month Name]=_selectmonthname),[Month])
var _count=COUNTX(FILTER(ALL('Table'),
'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])&&'Table'[Day]=MAX('Table'[Day])),[Day])
var _sum=SUMX(FILTER(ALL('Table'),'Table'[Day]=MAX('Table'[Day])&&'Table'[Month]=_month),[Value])
return
DIVIDE(_sum,_count)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @PrizzC15 ,
I created some data:
Here are the steps you can follow:
1. Create measure.
sum divde =
var _selectYear=SELECTEDVALUE('Table'[Year])
var _selectmonthname=SELECTEDVALUE('Table'[Month Name])
var _month=MAXX(FILTER(ALL('Table'),'Table'[Year]=_selectYear&&'Table'[Month Name]=_selectmonthname),[Month])
var _count=COUNTX(FILTER(ALL('Table'),
'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])&&'Table'[Day]=MAX('Table'[Day])),[Day])
var _sum=SUMX(FILTER(ALL('Table'),'Table'[Day]=MAX('Table'[Day])&&'Table'[Month]=_month),[Value])
return
DIVIDE(_sum,_count)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Im trying to create the measure that you provided but I get something as below:
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
Create a relationship between your table using composite key "Month-Day"
Then try to create DAX
_Avg Day Sales = CALCULATE( Divide(SUM([Sales),SUM(Table 2 [Count]),BLANK()))
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |