Forum Discussion
Need help with a measure
I modyfied Rest and New_Moms_grundlag columns from last example PBIX ^^^.
Pls try this:
Rest =
ISO.CEILING(CALCULATE(SUM(Indfortoldning[Moms grundlag]);ALLEXCEPT(Indfortoldning;Indfortoldning[Løbenummer])) -
[Moms grundlag] * CALCULATE(COUNTROWS('Indfortoldning');ALLEXCEPT('Indfortoldning';Indfortoldning[Løbenummer]));0,1)and
New_Moms_grundlag =
IF(
ABS([Rest]) < 1;
([Moms grundlag]);
BLANK()
)// if
- Shamatix8 years ago
Post Partisan
Hey,
It's still wrong
I have uploaded most of my data set http://ge.tt/5wv6omn2 just dont apply the changes as I have removed my connection string
Also I know from Qlikview the "Moms Grundlag" should be around
- McCow8 years ago
Resolver III
Hi Shamatix,
my formula above is in principal correct. You must use Average or Don't summarize option for "New_Moms_grundlag", not Sum.And the sum of all values (calculated in Excel) in this case is very near to QlikView: 2 864 629 678,17 .
I make the summarize measure (or change the formula for this column) a bit later.
Best regs
- McCow8 years ago
Resolver III
Shamatix
With this code the column "New_Moms_grundlag" can be summarized:New_Moms_grundlag = IF( ABS([Rest]) < 1 ; CALCULATE(AVERAGEX(Indfortoldning;[Moms grundlag]);ALLEXCEPT(Indfortoldning;Indfortoldning[Løbenummer])) / Indfortoldning[Nr_Qty]; BLANK() )// ifAnd the construction of "Indfortoldning[Nr_Qty]" (Løbenummer-Quantity column) above can be changed with:
Nr_Qty = CALCULATE(COUNTROWS('Indfortoldning');ALLEXCEPT('Indfortoldning';Indfortoldning[Løbenummer]))Here is the sample: