Forum Discussion
Need help with a measure
McCow wrote:
Shamatix wrote:
McCow wrote:A simplest way without complicate calculation is separate measure + Card visualisation. Totals in the table must be OFF.
I tried to use the Card visualization with yoru measure but it turns out blank
No, no, as Card visualization must be used ANOTHER measure (ex. MomsGrundlag) not MomsGrundlag2. Or Total of column.
But the normal "MomsGrundlag" doesnt show the correct result? as it still calculates the fields that is supposed to be blank but arent?
Hi Shamatix
please, check THIS solution.
I added two calculated columns. It is old school, but i suggest, that it is right solution.
You must use "New_Moms_grundlag" column. And "Rest" is another technical column (for test), must be leaved, The Nr_Qty and VarX - not obligated and can be erased.
- Shamatix8 years ago
Post Partisan
This looks promising, however I found quite a lot of mistakes =/
As you can see on the below picture this is one of many where it does not take the average
- McCow8 years ago
Resolver III
I look for better workaround solution and in this case i need all ther rows in your example set. It is possible to add? I feel we are closer and closer
- Shamatix8 years ago
Post Partisan
I'll try get some data - McCow8 years ago
Resolver III
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: