cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HarryB
Helper I
Helper I

MQL TO SAL conversion

Hello,

 

Does anyone know of a DAX query which will calculate the conversion rate from MQL to SAL.

 

The below is an example of what I am trying to achieve

HarryB_0-1669510172618.png

 

 

Thanks,

 

Harrison

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @HarryB ,

 

Please try:

First, create an index column:

vjianbolimsft_0-1669598778391.png

Output:

vjianbolimsft_1-1669598809263.png

Then apply the measure to a table visual:

 

Conversions = 
var _a = SUM('Table'[Value])
var _b = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Index]=MAX('Table'[Index])+1))
return DIVIDE(_b,_a)

Show items with no data:

vjianbolimsft_0-1669599261451.png

 

 

Final output:

vjianbolimsft_1-1669599283979.png

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @HarryB ,

 

Please try:

First, create an index column:

vjianbolimsft_0-1669598778391.png

Output:

vjianbolimsft_1-1669598809263.png

Then apply the measure to a table visual:

 

Conversions = 
var _a = SUM('Table'[Value])
var _b = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Index]=MAX('Table'[Index])+1))
return DIVIDE(_b,_a)

Show items with no data:

vjianbolimsft_0-1669599261451.png

 

 

Final output:

vjianbolimsft_1-1669599283979.png

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Jianbo Li,

 

Thank you!

 

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.