Ombir
Active Member
- Joined
- Oct 1, 2015
- Messages
- 433
Hi,
I don't have experience with DAX and I'm trying to understand a DAX which is used in a workbook.
Here is the link to workbook. https://community.tableau.com/servlet/JiveServlet/download/847360-289331/SampleData.xlsx
This is the formula which is used to calculate earned exposure.
=SUMX (
SUMMARIZE (
Table2,
Table2[InceptionDate],
Table2[ExpiryDate],
"Earned Exposure",
COUNTA(Table2[Policy Name])
* COUNTROWS (
CALCULATETABLE ('Table1',
KEEPFILTERS(
DATESBETWEEN (
Table1[DateKey],Table2[InceptionDate], Table2[ExpiryDate]
)
)
)
)
/ COUNTROWS (
DATESBETWEEN (
Table1[DateKey],Table2[InceptionDate], Table2[ExpiryDate]
)
)
),
[Earned Exposure]
)
Please help me to understand how earned exposure is calculated in Sheet1 for each month using above formulae.
<colgroup><col style="mso-width-source:userset;mso-width-alt:3364;width:69pt" width="92"> <col style="mso-width-source:userset;mso-width-alt:4059;width:83pt" width="111"> </colgroup><tbody>
[TD="width: 92"]Month[/TD]
[TD="width: 111"]Earned Exposure
[/TD]
[TD="class: xl63"]1[/TD]
[TD="align: right"]0.855191257[/TD]
[TD="class: xl63"]2[/TD]
[TD="align: right"]0.765027322[/TD]
[TD="class: xl63"]3[/TD]
[TD="align: right"]0.846994536
[/TD]
</tbody>
Regards,
Ombir
I don't have experience with DAX and I'm trying to understand a DAX which is used in a workbook.
Here is the link to workbook. https://community.tableau.com/servlet/JiveServlet/download/847360-289331/SampleData.xlsx
This is the formula which is used to calculate earned exposure.
=SUMX (
SUMMARIZE (
Table2,
Table2[InceptionDate],
Table2[ExpiryDate],
"Earned Exposure",
COUNTA(Table2[Policy Name])
* COUNTROWS (
CALCULATETABLE ('Table1',
KEEPFILTERS(
DATESBETWEEN (
Table1[DateKey],Table2[InceptionDate], Table2[ExpiryDate]
)
)
)
)
/ COUNTROWS (
DATESBETWEEN (
Table1[DateKey],Table2[InceptionDate], Table2[ExpiryDate]
)
)
),
[Earned Exposure]
)
Please help me to understand how earned exposure is calculated in Sheet1 for each month using above formulae.
<colgroup><col style="mso-width-source:userset;mso-width-alt:3364;width:69pt" width="92"> <col style="mso-width-source:userset;mso-width-alt:4059;width:83pt" width="111"> </colgroup><tbody>
[TD="width: 92"]Month[/TD]
[TD="width: 111"]Earned Exposure
[/TD]
[TD="class: xl63"]1[/TD]
[TD="align: right"]0.855191257[/TD]
[TD="class: xl63"]2[/TD]
[TD="align: right"]0.765027322[/TD]
[TD="class: xl63"]3[/TD]
[TD="align: right"]0.846994536
[/TD]
</tbody>
Regards,
Ombir