Forum Discussion
Overall Sum for each row
Hi All,
I would like to know how to calculate this in a table.
| Action | Number of Hits | Visit Count |
| What is Range | 31702 | 54209 |
| What is Verified | 24990 | 57736 |
| What can be informed | 14449 | 58315 |
| Collapse | 12264 | 11129 |
| Sign literature | 6929 | 61015 |
| which partner | 6270 | 68906 |
| Expand | 3688 | 33737 |
| Vary Information | 2423 | 76180 |
| Tile Click | 2 | 8049 |
| Blank | 29416 | |
| Total | 102717 | 458692 |
The user would like to see the total of Column C ( Visit Count) in every record like the one shown below
Expected Result:
| Action | Number of Hits | Visit Count |
| What is Range | 31702 | 458692 |
| What is Verified | 24990 | 458692 |
| What can be informed | 14449 | 458692 |
| Collapse | 12264 | 458692 |
| Sign literature | 6929 | 458692 |
| which partner | 6270 | 458692 |
| Expand | 3688 | 458692 |
| Vary Information | 2423 | 458692 |
| Tile Click | 2 | 458692 |
| Blank | 458692 |
Vist count is a Column with a if statement in it.
Vist Count =
if (overall_rank = 1 then visit_count else 0)
help me achieve this.
- Anonymous7 years ago
I have replicated the scenario and it is giving me result as expected.
13 Replies
- AnonymousNot applicable
I think you need to use "all" in your DAX try this
if (overall_rank = 1 then All(visit_count) else 0)
Thanks,
Aditya
- AnonymousNot applicable
Hi Anonymous ,
Thanks for the help ,
but its throwing me an error saying below
" A table of Multiple Values was supplied where a single vlaue was expected"
- AnonymousNot applicable
Can you try this :
if (overall_rank = 1 then sumx(All(Enter visitcount table name herer),visit_count) else 0)
if this doesn't work, please let me know with some sample data.
- AnonymousNot applicable
Anonymous nope it gave a weired numbers.. i it didn't worked.
- AnonymousNot applicableTotal= sumx(All(Table1),Table1[Visit Count])
- AnonymousNot applicable
Anonymous
I tried this before you sent it to me, its throwing some weired numbers as well.
- AnonymousNot applicable
It is not inside if statement.