Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi there,
I wrote a measure to get the customers who purchased a product for the first time in a certain period.
The formula below works but I'm trying to take it to the next level and say 'first time' for the users.
At the moment, 1 is pulling in but I want to change it to say 'First Time'. Please see screenshot below.
Any help would be appreciated.
Office Supplies first time =
VAR OfficeSuppliesCustomersJanuary2015 =
CALCULATETABLE(
VALUES(Orders[Customer Name] ),
FILTER(
Orders,
Orders[Product Category] = "Office Supplies" &&
Orders[Order Date] >= DATE(2015, 1, 1) &&
Orders[Order Date] <= DATE(2015, 1,31)
)
)
RETURN
COUNTROWS(
EXCEPT(
OfficeSuppliesCustomersJanuary2015,
CALCULATETABLE(
VALUES(Orders[Customer Name]),
FILTER(
Orders,
Orders[Product Category] = "Office Supplies" &&
Orders[Order Date] < DATE(2015, 1, 1)
)
)
)
)
Solved! Go to Solution.
Hi @gbarr12345
Wrap the COUNTROWS in an IF to return the desired text
IF (
COUNTROWS(
EXCEPT(
OfficeSuppliesCustomersJanuary2015,
CALCULATETABLE(
VALUES(Orders[Customer Name]),
FILTER(
Orders,
Orders[Product Category] = "Office Supplies" &&
Orders[Order Date] < DATE(2015, 1, 1)
)
)
)
) = 1,
"First Time"
)
Regards
Phil
Proud to be a Super User!
That worked! Thank you so much!!
Hi @gbarr12345
Wrap the COUNTROWS in an IF to return the desired text
IF (
COUNTROWS(
EXCEPT(
OfficeSuppliesCustomersJanuary2015,
CALCULATETABLE(
VALUES(Orders[Customer Name]),
FILTER(
Orders,
Orders[Product Category] = "Office Supplies" &&
Orders[Order Date] < DATE(2015, 1, 1)
)
)
)
) = 1,
"First Time"
)
Regards
Phil
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
87 | |
85 | |
68 | |
67 | |
64 |
User | Count |
---|---|
210 | |
118 | |
116 | |
81 | |
74 |