Forum Discussion
Report Table View Different from Data View
- Anonymous5 years ago
I found my own solution by updating the inner measure [Transaction Count]. This will summarize transactions that have the same comment but individually count transactions that have distinct comments.
[Transaction Count] = COUNTROWS( SUMMARIZE( Transactions, Transactions[trans_id], Transactions[comments] ) )
KNP sorry...I forgot to add that. The calculation for Transaction count = COUNT( trans_id )
Thank you for your support
Possibly, DISTINCTCOUNT( trans_id ) will work, depending on what else you're using that measure for.
Edit: may need to see data model with relationships if it isn't that simple.
- Anonymous5 years agoNot applicable
KNP I tried DISTINCTCOUNT( trans_id ) but that did not work well. If you look at "Expected Report Table Output", using DISTINCTCOUNT( trans_id ) will only give 1 count for trans_id = 3.
- KNP5 years agoSuper User
I think I need to see a more complete set of data and the model with relationships.
My gut feeling, I'd be doing more data modelling in Power Query and possibly separating out the comments or concatenating them into one column, but I'm guessing at this point.
- Anonymous5 years agoNot applicable
KNP the data model is just 2 tables: 1 large fact/dim table (Transactions) + 1 Calendar table
- KNP5 years agoSuper User
Anonymous - still need more info to be able to offer any guidance. From your original post, I can't figure out what is causing transactions 1 and 5 to "appear" to be duplicated and therefore how to write the measure or re-model in Power Query.
- Anonymous5 years agoNot applicable
KNP thank you so much for your support. I was able to find my own solution by updating my inner measure [Transaction Count]. Ultimately, I figured out that by using COUNTROWS + SUMMARIZE, it will summarize any transaction that has the same comment but individually count any transaction that has distinct comments.
Regardless, thank you so much for your support!
COUNTROWS( SUMMARIZE( Transactions, Transactions[trans_id], Transactions[comments] ) )