Forum Discussion
Anonymous
7 years agoNot applicable
Countx Function
Gentleman, I have faced some difficulties in finding Carrier Number. From below sample table, I wanted Carrier operated per month by Customer shown in 2nd Table. Customer Carrier Jan'19 Feb'...
- 7 years ago
Hi Anonymous ,
Take a try of this:
Measure 2 = var a = CALCULATE(MAX('Table'[Value]),ALL('Table'),VALUES('Table'[Carrier]),VALUES('Table'[Month])) Return IF(MAX('Table'[Value])=a,1,0)Best regards,
Dina Ye
Anonymous
7 years agoNot applicable
Thanks Dina, its really workout out.
Need one more help. which i have tried to do but couldn't get any success.
Suppose, if my Table is in another formate like instead of the month in Column it is in Row format then? i have tired to apply same code but failed.
appreciate your help if you can
| Customer | Carrier | Month | Value | Carrier Count** |
| A | A1 | Jan'19 | 0 | |
| B | A1 | Jan'19 | 500 | 1 |
| C | A2 | Jan'19 | 400 | 1 |
| D | A3 | Jan'19 | 700 | 1 |
| A | A1 | Feb'19 | 400 | 1 |
| B | A1 | Feb'19 | 0 | |
| C | A2 | Feb'19 | 300 | 1 |
| D | A3 | Feb'19 | 600 | 1 |
| A | A1 | Mar'19 | 500 | 1 |
| B | A1 | Mar'19 | 200 | 0 |
| C | A2 | Mar'19 | 400 | 1 |
| D | A3 | Mar'19 | 700 | 1 |
v-diye-msft
7 years agoCommunity Support
Hi Anonymous ,
Take a try of this:
Measure 2 = var a = CALCULATE(MAX('Table'[Value]),ALL('Table'),VALUES('Table'[Carrier]),VALUES('Table'[Month]))
Return
IF(MAX('Table'[Value])=a,1,0)Best regards,
Dina Ye
- Anonymous7 years agoNot applicable
Thanks its works absolutely :)