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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Create a column which is the division of an existing column by an existing measure

I have a calendar table with two columns of decimal numbers: Column1 and Column2. I also have a measure (Measure1) based on Column2, which is nothing but a moving average of Column2.

 

I would like to create Column3 as the result of dividing Column1 by Measure1. Is that feasible at all? Does it make it sense?

 

I can't make it work. I get meaningless numbers if do Column 3 = Column1 / Measure1

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi,@ric

    After my research, you can use this measure

 

Measure = CALCULATE(SUM('Calendar'[Column1]))-[Measure1]

 and drag it into the line chart.

7.PNG

by the way, DATESINPERIOD Function is time intelligence functions, so you need a date table for it.

 

here is pbix,please try it.

 

https://www.dropbox.com/s/2qp02y2u86oi751/Create%20a%20column%20which%20is%20the%20division%20of%20a...

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lili6-msft
Community Support
Community Support

hi,@ric

      We can create a calculated column to reference a measure value like this: Column1= <measure name>. But you need to note the calculated column values are calculated based on table context so it's fixed. So, you need to convert the formula of measure to the formula of column, then add the Column3.

of course, to do the further calculation, you can use measure directly without creating additional calculated column. If you have some specific requirement, please share the sample data and expected results for our analysis.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

See the sample data below. The name of the table is Calendar. It includes both columns: Column1 and Column2.

 

The measure Measure1 is a moving average of Column2, as you can see below.

 

My goal is to plot the ratio of Column1 over Measure1 on a line chart with daily granularity. I can't make it work. I don't know if I need a measure or a column to work this out.

 

Any help/advice will be highly appreciated!

 

Measure1 = 
CALCULATE (
    SUM ( 'Calendar'[Column2] ),
    DATESINPERIOD ('Calendar'[Date], LASTDATE('Calendar'[Date]),-20,DAY)
) + 0

 

DateColumn1Column2
01 January 201214.831.01
02 January 201214.470.82
03 January 201214.260.52
04 January 201214.621.23
05 January 201214.430.75
06 January 201213.870.42
07 January 201213.661.12
08 January 201213.750.99
09 January 201213.841.12
10 January 201214.020.44
11 January 201213.961.14
12 January 201214.150.88
13 January 201214.731.24
14 January 201214.010.72
15 January 201213.710.89
16 January 201213.510.65
17 January 201213.621.41
18 January 201213.460.75
19 January 201213.450.85
20 January 201214.181.23
21 January 201213.910.76
22 January 201213.510.81
23 January 201214.001.35
24 January 201214.160.98
25 January 201213.940.84
26 January 201214.040.52
27 January 201214.221.47
28 January 201213.690.66
29 January 201213.660.82
30 January 201213.320.63
31 January 201213.070.99
01 February 201213.110.81
02 February 201213.150.98
03 February 201213.181.04
04 February 201213.170.81
05 February 201213.421.11
06 February 201213.240.75
07 February 201213.431.30
08 February 201214.191.11
09 February 201214.551.05
10 February 201214.400.57
11 February 201213.931.09
12 February 201213.680.86
13 February 201213.741.02
14 February 201213.750.81
15 February 201213.921.22
16 February 201214.140.87
17 February 201214.000.95
18 February 201214.271.46
19 February 201214.271.08
20 February 201214.070.82
21 February 201214.090.88
22 February 201213.170.28
23 February 201213.481.07
24 February 201213.681.10
25 February 201213.401.60
26 February 201213.811.32
27 February 201213.420.50
28 February 201213.501.00
29 February 201213.470.51
01 March 201213.460.72
02 March 201213.541.63
03 March 201213.521.00
04 March 201213.000.72
05 March 201212.750.74
06 March 201212.930.89
07 March 201212.950.66
08 March 201213.191.60
09 March 201213.610.90
10 March 201213.491.03
11 March 201213.540.82
12 March 201213.310.87
13 March 201213.751.04
14 March 201213.010.45
15 March 201212.840.92
16 March 201213.001.19
17 March 201213.221.11
18 March 201213.200.62
19 March 201212.770.95
20 March 201213.401.26
21 March 201212.800.70
22 March 201212.630.90
23 March 201212.851.13
24 March 201212.981.11
25 March 201213.681.12
26 March 201214.091.06
27 March 201214.321.06
28 March 201213.540.59
29 March 201213.671.24
30 March 201214.120.96
31 March 201213.860.75
01 April 201213.780.83
02 April 201213.880.89
03 April 201213.700.79
04 April 201213.490.68
05 April 201213.680.99
06 April 201213.300.88
07 April 201213.311.09
08 April 201213.400.95
09 April 201213.721.12
10 April 201213.720.76
11 April 201213.090.50
12 April 201213.631.01
13 April 201213.550.65
14 April 201212.490.45
15 April 201212.590.83
16 April 201212.501.00
17 April 201212.851.18
18 April 201212.200.18
19 April 201211.820.91
20 April 201212.021.17
21 April 201212.161.02
22 April 201212.660.85
23 April 201212.410.88
24 April 201212.691.02
25 April 201212.511.00
26 April 201212.550.67
27 April 201212.610.93
28 April 201212.110.68
29 April 201212.360.92
30 April 201212.620.93
01 May 201212.731.11
02 May 201212.080.47
03 May 201212.571.33
04 May 201212.340.78
05 May 201212.400.90
06 May 201212.110.69
07 May 201212.261.02
08 May 201211.930.44
09 May 201211.990.80
10 May 201211.960.76
11 May 201211.810.64
12 May 201212.431.24
13 May 201211.960.56
14 May 201212.090.98
15 May 201211.570.65
16 May 201211.790.70
17 May 201211.831.08
18 May 201211.230.66
19 May 201211.511.07
20 May 201211.410.66
21 May 201211.620.81
22 May 201211.681.11
23 May 201212.041.01
24 May 201211.820.45
25 May 201212.111.15
26 May 201211.410.62
27 May 201211.390.72
28 May 201211.740.90
29 May 201211.590.61
30 May 201211.651.22
31 May 201211.510.72
01 June 201211.990.78
02 June 201211.840.93
03 June 201212.110.86
04 June 201212.120.79
05 June 201212.581.04
06 June 201212.250.77
07 June 201212.040.48
08 June 201212.080.89
09 June 201212.661.22
10 June 201212.250.74
11 June 201212.140.80
12 June 201212.280.94
13 June 201211.990.64
14 June 201212.121.07
15 June 201212.581.35
16 June 201212.280.99
17 June 201212.110.47
18 June 201212.800.95
19 June 201213.111.03
20 June 201213.401.01
21 June 201213.390.73
22 June 201213.801.15
23 June 201213.160.53
24 June 201212.800.73
25 June 201213.251.16
26 June 201212.780.46
27 June 201212.280.83
28 June 201212.090.81
29 June 201212.551.33
30 June 201212.730.95
01 July 201213.180.63
02 July 201212.830.45
03 July 201212.630.91
04 July 201212.841.17
05 July 201212.560.58
06 July 201212.250.69
07 July 201212.000.84
08 July 201212.580.79

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.