Can anyone clarify this:
Most of my trouble comes from trying to figure out the proper reference format from where ever Im trying to call it.
Payment History[Date] [Payment History][Date] [Payment History].[Date] [Payment History[Date]]
These are all valid formats depending on where you are and what your trying to doโฆ but, how do i know which format to use?
CURRENT ISSUE
I have a table Students with a Reference to the Payments table called โPayment Historyโ.
Iโm trying to find all students that have NOT paid this monthโฆ Im using the following query and I just cant seem to get the reference correct.
SELECT(
Students[Name],
AND(
Year(Payment History[Date])<>Year(Today()),
Month(Payment History[Date])<>Month(Today())
) )
This query will go into the Email Template.
anyway, sorry for the double post hereโฆ
Thanks for all the help so far everyoneโฆ
COUNT(SELECT(Students[Name], AND( Year([Date])=Year(Today()), Month([Date])=Month(Today()) ))=0
is the basic but then the payment needs to be in the same table. IF the payment is in another table, you should read the status likeโฆ
COUNT(SELECT(Payment History[KeyColumn], AND( YEAR([Date])=YEAR(TODAY()), MONTH([Date])=MONTH(TODAY()), [NAME]=[_THISROW].[NAME]) ))=0
@Aleksi_Alkio That did the trickโฆ used this Expression in a slice on Students and got exactly what I wanted.
COUNT(
SELECT(
[Payment History][Name],
AND(
YEAR([Date])=YEAR(TODAY()),
MONTH([Date])=MONTH(TODAY()),
[NAME]=[_THISROW].[NAME]
)
) )=0
Again, it came down to trial and error on the format of
[Payment History][Name] vs Payment History[Name]
Thanks a ton my friend.
@David_Hopkins Soโฆ I need this same result for use in the Phone Field of an SMS Workflow task.
I was using your methodology, for building the expressions, and for the most part itโs workingโฆ but I cant seem to get it to work on this oneโฆ
Im working in WF against the Reminders Table. (key, Ttitle, Message, Valediction, Last Sent) โฆ standard for sending an SMS on update of the Last Sent field.
I need the cell numbers to come from Active Students slice where Payment History returns count=0 for Month(Today)โฆ
Something like thisโฆ
SELECT(Active Students[Cell],
COUNT(
[Payment History][Name],
AND(
YEAR([Date])=YEAR(TODAY()),
MONTH([Date])=MONTH(TODAY()),
[NAME]=[_THISROW].[NAME]
)
)=0 )
Butโฆ that throws a great looking errorโฆ
โฆ contains an invalid expression โUnable to find column โPayment Historyโ, did you mean โPayment Historyโ?โ
(why, yesโฆ
Yes I did mean Payment Historyโฆ )
Okโฆ I donโt know where my head is at some daysโฆ but I walked away for a few minsโฆ While I was clearing my head i realized that I have a Slice called โMissing Payments This Monthโ. So, I just set my WF to:
SELECT(Missing Payments This Month[Cell], [Status]=โActiveโ)
Yeahโฆ sometimes itโs good to go away from the box so you can see it again from another directionโบ
User | Count |
---|---|
39 | |
29 | |
23 | |
23 | |
13 |