I have a format expression like below.
SUM(ACCOUNTHEADS[Debit]) <>
SUM(ACCOUNTHEADS[Credit])
If Both figure Sum of โDebitโ and โCreditโ not tallied, the particular field value become red. As per the records, both figures are tallied, see the test expression picture below. But system shows โFalseโโฆ what is the problem here? please help me out.
The test results seem to be correct, because it returns false to not-equal operator (<>) which means both SUM values are evaluated as equal.
@RezaRaoofi I want the format expression in such way that if both โDebitโ and โCreditโ are not tallied each otherโฆ so what is the correct expression please?
Thanks lot Mr. Reza. It works in different wayโฆactually i forgot the basic rule - system will check the condition row by row. I created two virtual columns to store โsum of debit across the tableโ and โsum of credit across the tableโ. Now i put expression similar to yours. Thanks again.
You are welcome! I am glad you worked it out.
I donโt know what your column structure is, but I am guessing perhaps the SUM values you have calculated always are tallied, meaning you are not calculating any non-equal SUMs of Debit/Credit to trigger the format rule.
@RezaRaoofi Table name is โACCOUNTHEADSโ Columns are โDebitโ and โCreditโ both are โpriceโ type.
Yes, but if you sum Credit/Debit across all rows in that table, you will always have only one value for each SUM, unless you have some sort of grouping by another column in order to have different sum values and the format rule evaluate that condition against different SUM values.
You probably need something like: SUM(SELECT(ACCOUNTHEADS[Debit], [Customer]=[_THISROW].[Customer])) <> SUM(SELECT(ACCOUNTHEADS[Credit], [Customer]=[_THISROW].[Customer]))
@Bellave_Jayaram I believe that customer-wise check not required as i try to check both โDebitโ and โCreditโ figures are matched across the table โAccountHeadsโ. By above my original expression, it was working fineโฆbut now it turned outโฆ i dont know why?
Well, we know the expression in your Format ruleโs condition, also the first screenshot was showing the right evaluation result (False) from that expression; can you send a screenshot of the AccountHeads tableโs column structure?
@RezaRaoofi Attached below is the AccountHeads Table column structure please.
Hmm, I think you need to remove those SUM() functions from your format rule condition; perhaps something like: AccountHeads[Debit] <> AccountHeads[Credit] or AccountHeads[Debit Total] <> AccountHeads[Credit Total] or AccountHeads[Debit Balance] <> AccountHeads[Credit Balance]
Each row in AcocuntHeads must have different distinct values for [Debitโฆ]/[Creditโฆ] columns in order for format rule to work; otherwise if you SUM across all rows in AccountHeads table like SUM(AccountHeads[Debit]) in format ruleโs condition, it will always return the same SUM value for all rows, therefore you will see no different formatting from row to row.
User | Count |
---|---|
39 | |
35 | |
29 | |
23 | |
18 |