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>
</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.
Month | Earned Exposure |
1 | 0.855191257 |
2 | 0.765027322 |
3 | 0.846994536 |
<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>
</tbody>
Regards,
Ombir