How to display shipping method in cart page of opecart - opencart

Anyone tell me how to diplay shipping method in cart page of opecart when i click on checkout?
PRODUCT PRODUCT TITLE UNIT PRICE TOTAL
Chandramrit Ras CHANDRAMRIT RAS Rs. 120 Rs. 120
Agnikumar Ras AGNIKUMAR RAS Rs. 90 Rs. 90
Arvindasav ARVINDASAV Rs. 55 Rs. 55
Vindhya Nimbadi Capsule VINDHYA NIMBADI CAPSULE Rs. 300 Rs. 3,000
Sub-Total: Rs. 3,265
Total: Rs. 3,265
here display only total but I want to add here shipping method

Related

Calculate the total of one measure (with a upper limit) in another measure

I need to calculate the total value of a column per employee per month. Then I need to impose a limit of 177 per employee per month. This will go into a matrix with employee as rows and months as columns. Lastly, i want to add up all the amounts per month to show the total in a line chart.
I made a measure to calculate the 1% with a max of amount of 177= if(0.01sum[amount]>177, 177,0.01sum[amount]). Then I used this measure in my matrix as explained above. This worked fine, but when i want to make the line chart the limit of 177 is still imposed because I use the same measure.
I tested it with some dummy data! Please do it like this:
Employee Month Amount
Jack January 1500
Joe February 20000
Joe March 1600
Jack April 1800
Brad June 10000
Jack July 9500
Joe February 9500
Brad April 6500
Jack December 12000
Joe June 8000
Brad April 9500
Jack January 1000
Jack April 1100
Jack April 8000
Joe February 12000
Joe February 12500
Joe February 13000
Brad June 15000
Brad June 16000
Here is the measure (DAX Code)you need to use:
your_measure =
if(0.01 * sum(your_table[Amount]) > 177, 177,0.01* sum(your_table[Amount]))
Then lets put it on a matrix and line chart:
If you want your 177 restriction not to be applied in line chart, Why not create another simple total measure:
= 0.01 * SUM(your table[amount])
Update requested from Peter
Now You need to check the whole picture! Employee is not a part of filter context. Model is filtered only by month! I added both measure as legends to the line chart!

Finding the Average (confused)

Trying to find average of Olympic medal winners under the age of 20 for a particular year. Here is data:
400 total events
300 individuals; 85 persons 20yrs and younger, 215 persons 21yrs and Older.
Total medals earned 20 years old and younger = 122 medals.
I am trying to find the average of medals received by persons 20 years old and younger.
I am using C++ language.

How do I create a pivot table with weighted averages from a table in PowerBI?

I have data in the following format:
Building
Tenant
Type
Floor
Sq Ft
Rent
Term Length
1 Example Way
Jeff
Renewal
5
100
100
6
47 Fake Street
Tom
New
3
500
200
12
I need to create a visualisation in PowerBI that displays a pivot table of attribute by tenant, with a weighted averages (by square foot) column, like this:
Jeff
Tom
Weighted Average (by Sq Ft)
Building
1 Example Way
47 Fake Street
-
Type
Renewal
New
-
Floor
5
3
-
Sq Ft
100
500
433.3333333
Rent
100
200
183.3333333
Term Length (months)
6
12
11
I have unpivoted the original data, like this:
Tenant
Attribute
Value
Jeff
Building
1 Example Way
Jeff
Type
Renewal
Jeff
Floor
5
Jeff
Sq Ft
100
Jeff
Rent
100
Jeff
Term Length (months)
6
Tom
Building
47 Fake Street
Tom
Type
New
Tom
Floor
3
Tom
Sq Ft
500
Tom
Rent
200
Tom
Term Length (months)
12
I can almost create what I need from the unpivoted data using a matrix (as below), but I can't calculate the weighted averages column from that matrix.
Jeff
Tom
Building
1 Example Way
47 Fake Street
Type
Renewal
New
Floor
5
3
Sq Ft
100
500
Rent
100
200
Term Length (months)
6
12
I can also create a table with my attributes as headers (instead of in a column). This displays the right values and lets me calculate weighted averages (as below).
Building
Type
Floor
Sq Ft
Rent
Term Length (months)
Jeff
1 Example Way
Renewal
5
100
100
6
Tom
47 Fake Street
New
3
500
200
12
Weighted Average (by Sq Ft)
-
-
-
433.3333333
183.3333333
11
However, it's important that these values are displayed vertically instead of horizontally. This is pretty straightforward in Excel, but I can't figure out how to do it in PowerBI. I hope this is clear. Can anyone help?
Thanks!

Power BI - Showing Top 5 records in Metrix Table but total should show for all records

I have table with thousands of record. i want to create a table visual that will show top 5 records for each category. i created a measure to achieve this and i am getting the result exactly the same i am looking for but facing one issue there.
See below image where i am showing top 5 records for each category, but after each category i have total.
I don't want that total for top 5 records i am showing in the table instead i want the total of all the records which is there under each category.
How can i achieve that?
Measure I created is - Top 5 = RankX(AllSelected(table(Category), Table(account), table(name)),amount_measure,,,Dense)
for Top 5 measure i am putting the filter for top 5.
Category
Account
Name
P%
amount
country
owner
Food
A101
AA11
10%
105
India
A
Food
A102
AA12
20%
120
India
A
Food
A103
AA13
80%
100
India
A
Food
A104
AA14
30%
150
India
A
Food
A105
AA15
60%
90
India
A
Stat
B101
AA11
10%
205
India
A
Stat
B102
AA12
20%
220
India
A
Stat
B103
AA13
80%
200
India
A
Stat
B104
AA14
30%
250
India
A
Stat
B105
AA15
60%
190
India
A
Admn
D101
AD11
10%
305
India
A
Admn
D102
AD12
20%
320
India
A
Admn
D103
AD13
80%
300
India
A
Admn
D104
AD14
30%
350
India
A
Admn
D105
AD15
60%
290
India
A
Thanks,
SK
You can try this
Let's suppose you have the following measures
_sumAMT:= SUM('Table 1'[amount])
and this is your ranking measure
_sumAMTRank:= RANKX(ALLEXCEPT('Table 1','Table 1'[Category]),[_sumAMT],,DESC,Dense)
You can revise the subtotal by doing this
_sumAMT by CAT:= CALCULATE(SUM('Table 1'[amount]),ALLEXCEPT('Table 1','Table 1'[Category]))
_revisedTotal:= IF(HASONEVALUE('Table 1'[Name])=true(),[_sumAMT],[_sumAMT by CAT])

Nested REGEX lookup

I'm trying to extract relevant information from a text blob for purchasing food items. Is there a way to recourse after a group match and extract the relevant information? For example I'd like to get a list of statuses and their state "DOWN" and the time 120 min / timestamp. I'm going through the documentation and having some difficulty with the recursive aspect of grouping.
(Orange|GRAPE|APPLE)+.*?(?=(?:\.)|$)
Food: APPLE
Purchase status is DOWN after not receiving any purchases for more than 120 min. Last purchase received time is: 06/23/2010 11:20:21 EDT (-0400).
Advertising Purchase status is DOWN after not receiving any purchases for more than 120 min. Last purchase received time is: 06/23/2010 11:20:21 EDT (-0400).
Food: Orange
Purchase status is DOWN after not receiving any purchases for more than 120 min. Last purchase received time is: 06/23/2010 11:20:21 EDT (-0400).
Advertising Purchase status is DOWN after not receiving any purchases for more than 120 min. Last purchase received time is: 06/23/2010 11:20:21 EDT (-0400).
Food: GRAPE
Purchase status is DOWN after not receiving any purchases for more than 120 min. Last purchase received time is: 06/23/2010 11:20:21 EDT (-0400).
Advertising Purchase status is DOWN after not receiving any purchases for more than 120 min. Last purchase received time is: 06/23/2010 11:20:21 EDT (-0400).
Current Aproach:
https://regex101.com/r/L4M8lO/1