Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
So essentially, I have a set of data for a store that includes cash registers 1-15, with the numerical amount of transactions that occur at these registers for each hour they are operational. My problem is that when there is 0 transactions for a given register in a given hour, instead of showing 0 for that register in that hour, nothing appears. I need to find a way to make those 0's appear for the given register # when no transactions occur.
Hello @PatrickF2002 at the end of your measure write +0 to get the values as '0' whereever the data is not available.
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
Assuming the numerical amount of transactions is a Count function, create a measure:
TransactionsCount =
var tcount = COUNT(Table[TransactionID])
RETURN
IF(ISBLANK(tcount), 0, tcount)
Proud to be a Super User!
Im going to include an example image from data view to help explain my issue a little better
registers 2-8 have txn’s in the txn column
-registers 1 and 9 do not have txn’s in the txn column, and so they are not showing up in the data set at hour 13.
-registers 1 and 9 should be included in the data set at hour 13, with the number 0 in the txns column for both respectively
So, do you want to add register 1 and 9 as rows into your source table?
Proud to be a Super User!
They are already in the source table, however they do not appear because no trnxs are occuring at them during hour 13. I want to make it so that they appear with 0's in the trnx column.
Then just create a measure as suggested above by myself or @Kishore_KVN and add it to a table visual.
Proud to be a Super User!
I'll give it a try, would you be able to show me an example of the measure using the column headers from the data example I provided?
TransactionsCount =
var tcount = COUNT('Insert your table name here'[register_id])
RETURN
IF(ISBLANK(tcount), 0, tcount)
After created add all those columns to the table visual plus the created measure (this created measure would replace txns column)
Proud to be a Super User!
So I tried your formula, and I got an error reading this-
Any advice on how to fix?
First write the measure name then Alt + Enter and write the var line, then instead of an =, write a RETURN.
Also, instead of ISBLANK(vregister_count[txns]) write it as (ISBLANK(tcount))
See example here:
TransactionsCount = var tcount = COUNT('Insert your table name here'[register_id]) RETURN IF(ISBLANK(tcount), 0, tcount)
Proud to be a Super User!
User | Count |
---|---|
91 | |
73 | |
68 | |
63 | |
55 |
User | Count |
---|---|
98 | |
89 | |
73 | |
62 | |
61 |