Hi Team ,
Can some one help me here , where i am trying to execute multiple conditions like below . From Store Data Table Total_Amount Coloumn Data on Todays date and Only Cash Payments .Below is my table for the reference .
StoreName | Transaction ID | Date | Item | Unit | Quantity | Price | Total_Amount | Vendor | Payment | Mode of Payment | Transaction_Number |
A | 0001 | 17-01-2023 | Carrot | pc | 1 | 200 | 200 | xyz | Paid | Cash |
SUM(SELECT(Store_Data[Total_Amount],AND
([Date]="TODAY()"
([StoreName]=[_THISROW].[StoreName]),
([Mode of Payment]=โCashโ ) )))
Note: This expression could impact performance. SUM( ........The list of values of column 'Total_Amount' ........from rows of table 'Store_Data' ........where this condition is true: (ALL these statements are true: ............1: (The value of column 'Date') is equal to ("TODAY()") ............2: (The value of column 'Mode of Payment') is equal to ("Cash")))
Can some one help me the above formula .
Thanks in advance .
You don't specify what's wrong or what help you want.
Here's one likely problem:
@Harish2406 wrote:
[Date]="TODAY()"
Remove the quotation marks and follow with a comma.
I have two tables ,in it . Store_Data is the table where daily expences are getting added .
And i have another table DailyReport In this table one of the coloumn Day_Cash_Expences (i am lloking this value from Store_Data) with the below condition .
SUM(SELECT(Store_Data[Total_Amount],AND
([Date]=TODAY(),
([StoreName]=[_THISROW].[StoreName]),
([Mode of Payment]=โCashโ ) )))
But i did not get the data which is insterted on today's date .
Store_Data (Table structure) -
StoreName | Transaction ID | Date | Item | Unit | Quantity | Price | Total_Amount | Vendor | Payment | Mode of Payment | Transaction_Number |
A | 0001 | 17-01-2023 | Carrot | pc | 1 | 200 | 200 | xyz | Paid | Cash |
DailyReport (Table data)
Date | StoreName | Opening_Cash | Today_Sale | PhonePay | AyesZ | Zomato | Swiggy | Day_Cash_Expences | Day_Closing_Cash |
16-01-2023 | 0001 | โน4,243.00 | โน11,319.00 | โน6,323.00 | โน0.00 | โน0.00 | โน0.00 | I want cash Expences on today's date here | 9239 |
Thanks
@Harish2406 wrote:
But i did not get the data which is insterted on today's date .
It's not clear what, if any, data you did get. That information could aid in troubleshooting.
Meanwhile, here are two points to investigate.
I made a mistake , On both places Store name is Unique . (it was a typo error).
Store_Data (Table structure) -
StoreName | Transaction ID | Date | Item | Unit | Quantity | Price | Total_Amount | Vendor | Payment | Mode of Payment | Transaction_Number |
0001 | 6768021 | 17-01-2023 | Carrot | pc | 1 | 200 | 200 | xyz | Paid | Cash | |
0001 | 7878973 | 16-01-2023 | banana | pc | 1 | 30 | 30 | xyz | Paid | Cash |
DailyReport (Table data)
Date | StoreName | Opening_Cash | Today_Sale | PhonePay | AyesZ | Zomato | Swiggy | Day_Cash_Expences | Day_Closing_Cash |
16-01-2023 | 0001 | โน4,243.00 | โน11,319.00 | โน6,323.00 | โน0.00 | โน0.00 | โน0.00 | I want cash Expences on today's date here | 9239 |
Thanks
sum(Store_Data[Total_Amount])
The above condition sum of total amount is showing , but i need the total amount on today's date . I dont want yesterda's date .
How can it possible .
Finally after all i found the solustion .
SUM(SELECT(Store_Data[Total_Amount] ,
AND([date]= [_THISROW].[Date] , [StoreName]=[_THISROW].[StoreName],
[Mode of Payment]="Cash"])))
User | Count |
---|---|
37 | |
30 | |
29 | |
20 | |
18 |