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.
Apologies if the question isn't phrased correctly, I have a table which has session_date and visitor_count.
The visitor count is summed for each session date. I would like to find the average + stddev.p and average - stddev.p (which I will call UCL and LCL) of these summed values in a seperate column and populate the same value to each cell.
The reason for doing so is that I can plot the UCL and LCL values as a straight lines on the graph as show below in Excel.
However when I try to find the average it gives me the average by each row, as shown below.
Could someone help me on how to go about getting the UCL and LCL plotted on the graph? Thanks in advance!
Solved! Go to Solution.
Hi @Nikhil_bb ,
Sorry for replying late. Based on your description, you can create these measures:
avg =
VAR _sum =
CALCULATE ( SUM ( 'Table'[vistor count] ), ALL ( 'Table' ) )
VAR _count =
CALCULATE ( COUNTROWS ( 'Table' ), ALL ( 'Table' ) )
RETURN
_sum / _count
std dev = CALCULATE(STDEV.P('Table'[vistor count]),ALL('Table'))
UCL = [avg] + [std dev]
LCL = [avg] - [std dev]
Attached a sample file in the below, hopes to help you.
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Nikhil_bb ,
Sorry for replying late. Based on your description, you can create these measures:
avg =
VAR _sum =
CALCULATE ( SUM ( 'Table'[vistor count] ), ALL ( 'Table' ) )
VAR _count =
CALCULATE ( COUNTROWS ( 'Table' ), ALL ( 'Table' ) )
RETURN
_sum / _count
std dev = CALCULATE(STDEV.P('Table'[vistor count]),ALL('Table'))
UCL = [avg] + [std dev]
LCL = [avg] - [std dev]
Attached a sample file in the below, hopes to help you.
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
you can try by creating a measure
_VisitorCount = SUM(Table[Visitor Count])
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 |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |