Forum Discussion
How to create measure count the Con_num while selected Month
- 7 years ago
Hi kalif
When i test with your dataset, i can make the month slicer work for my measure.
1. add "month" in the slicer
2. create a calendar date table and connect it to your table, then add year and month from the calendar date table to the slicer,
Measures
sum = SUM(Sheet2[VDA AMOUNT]) count = COUNT(Sheet2[CON_NUM]) average = [sum]/[count] average2 = AVERAGE(Sheet2[VDA AMOUNT])
If you have any problem please let me know
Best Regards
Maggie
Why not just use:
AVERAGE = AVERAGE(Table9[VDA AMOUNT])
See attached PBIX and you want Table9, Page 4
Dear Greg, Thanks for your below measure, its working fine, need your assist, this table is child table 2 , get date from SUMMARIZE from Mother Table & CALCULATETABLE from child table 1 (above table =CALCULATETABLE('VDASUM', VDASUM[AID_CON_NUM] <> BLANK())
Mother Table:
| MONTH | GROUP | CHG_CODE | VDA AMOUNT | BKG_NUM | CON_NUM | VDA NUM |
| November-18 | CCU | WASH | 9.75 | SHLPK18001152 | AMFU3221483 | AGIN1819000129HQ |
| November-18 | CCU | SUR | 9.75 | SHLPK18001152 | AMFU3221483 | AGIN1819000129HQ |
| November-18 | CCU | SOR | 0 | SHLPK18001152 | AMFU3221483 | AGIN1819000129HQ |
| November-18 | CCU | LAS | 0.05 | SHLPK18001152 | AMFU3221483 | AGIN1819000129HQ |
| November-18 | CCU | ISPS | 3.25 | SHLPK18001152 | AMFU3221483 | AGIN1819000129HQ |
| November-18 | CCU | ICOM | -10 | SHLPK18001152 | AMFU3221483 | AGIN1819000129HQ |
| November-18 | CCU | FRT | 300 | SHLPK18001152 | AMFU3221483 | AGIN1819000129HQ |
| November-18 | CCU | EQP | 26 | SHLPK18001152 | AMFU3221483 | AGIN1819000129HQ |
Child table 1 = VDASUM = SUMMARIZE(VDA, VDA[AID_BKG_ID], VDA[AID_BKG_NUM], VDA[AID_CON_NUM],VDA[Month], "VDA AMOUNT", SUM(VDA[AID_F_AMT]))
Child table 2 = =CALCULATETABLE('VDASUM', VDASUM[AID_CON_NUM] <> BLANK())