Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi All,
This is my first Question. Please help me
I wanted to have New and Repeated User for my data and also total transaction done for new and repeated user. The thing is that I had joined 2 tables (on USER_REFERENCE_NUMBER) to get below table
USER_CREATION_DATE and USER_REFERENCE_NUMBER are from Customer table and TRANSACTION_CREATED_AT and TXN_AMOUNT are from transaction table
Please provide me the solution.
Solved! Go to Solution.
hi @ahpatil11
then try:
TransactionNew =
VAR _list1=
CALCULATETABLE(
VALUES(TableName[UserNumber]),
YEAR(TableName[UserCreationDate])=YEAR(TODAY()),
MONTH(TableName[UserCreationDate])=MONTH(TODAY())
)
VAR _list2=
CALCULATETABLE(
VALUES(TableName[UserNumber]),
YEAR(TableName[UserCreationDate])=YEAR(TODAY()),
MONTH(TableName[UserCreationDate])=MONTH(TODAY())-1
)
VAR _new =
EXCEPT(_list1,_list2)
RETURN
CALCULATE(
SUM(TableName[Amount]),
_new
)
TransactionRepeat =
CALCULATETABLE(
VALUES(TableName[UserNumber]),
YEAR(TableName[UserCreationDate])=YEAR(TODAY()),
MONTH(TableName[UserCreationDate])=MONTH(TODAY())
)
VAR _list2=
CALCULATETABLE(
VALUES(TableName[UserNumber]),
YEAR(TableName[UserCreationDate])=YEAR(TODAY()),
MONTH(TableName[UserCreationDate])=MONTH(TODAY())-1
)
VAR _repeat =
INTERSECT(_listthisyear, _listlastyear)
RETURN
CALCULATE(
SUM(TableName[Amount]),
_repeat
)
in case of issue, please conside post the sample data as text in the reply.
hi @ahpatil11
Hi @FreemanZ
Thank you for your reply
I wanted to show total transactions done in months by new and repeated users.
I tried your solution but it is coming has blank
can you help me with this
hi @ahpatil11
then try:
TransactionNew =
VAR _list1=
CALCULATETABLE(
VALUES(TableName[UserNumber]),
YEAR(TableName[UserCreationDate])=YEAR(TODAY()),
MONTH(TableName[UserCreationDate])=MONTH(TODAY())
)
VAR _list2=
CALCULATETABLE(
VALUES(TableName[UserNumber]),
YEAR(TableName[UserCreationDate])=YEAR(TODAY()),
MONTH(TableName[UserCreationDate])=MONTH(TODAY())-1
)
VAR _new =
EXCEPT(_list1,_list2)
RETURN
CALCULATE(
SUM(TableName[Amount]),
_new
)
TransactionRepeat =
CALCULATETABLE(
VALUES(TableName[UserNumber]),
YEAR(TableName[UserCreationDate])=YEAR(TODAY()),
MONTH(TableName[UserCreationDate])=MONTH(TODAY())
)
VAR _list2=
CALCULATETABLE(
VALUES(TableName[UserNumber]),
YEAR(TableName[UserCreationDate])=YEAR(TODAY()),
MONTH(TableName[UserCreationDate])=MONTH(TODAY())-1
)
VAR _repeat =
INTERSECT(_listthisyear, _listlastyear)
RETURN
CALCULATE(
SUM(TableName[Amount]),
_repeat
)
in case of issue, please conside post the sample data as text in the reply.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
22 | |
17 | |
17 | |
11 | |
7 |
User | Count |
---|---|
27 | |
26 | |
12 | |
12 | |
12 |