Pivot measure based on the pivot row label grouping - pivot-table

There is a table as shown in the pic
Is there a way to add a measure to the pivot created from the above data such that different error percentages can be used to different row label groups as shown in the pic?
If required I'm ready to do little bit of modification to the above source data, like adding some column or some calculation which should enable me to create such a measure but I'm really stuck here. Please help me out.
Update
Thanks to forums and members who constantly help people, I found out CONCATENATEX. So created three measures like below
Test_Group1=CONCATENATEX(GROUPBY(Range,Range[Group1]),LEFT(Range[Group1],1),"^")
Test_Group2=CONCATENATEX(GROUPBY(Range,Range[Group2]),LEFT(Range[Group2],1),"^")
Err=IF(SEARCH("^",[Test_Group2],1,0)=0,0.11,IF(SEARCH("^",[Test_Group1],1,0)=0,0.03,0.02))
Now Err is almost there but fails when single sub group items are there like in the pic. Tried to add dummy rows to the table by using UNION DAX function in the above measures but I'm missing something. Please help me out of this problem.

The answer is so simple. Please find the same in Power BI community forum.
Err = IF(isinscope(Range[Group2]),0.11,IF(isinscope(Range[Group1]),0.03,0.02))

Related

DirectQuery with parameters PowerBI

I try to create report and have some table with some values my purpose is when clicking on some row of table it should drill through to other page with line chart, my question is I have column EventTime and when I click on some row it should drill through on line chart where as X axis will be time and that time should have range +-5 minutes of EventTime column how can I make this? Is this possible to create DirectQuery SQL statement with parameters and if possible how can I change this parameters depends on filtered row column EventTime or there are some other possibilites?
Kindly thanks for all answers!
For the moment I don't think they have exact solution for this, I also tried to do similar thing, Unfortunately couldn't found useful resource.
Try some custom visualizations, in import more visualizations, Obviously most of effective ones are paid versions, But you can do some stuff from free versions.

Dynamic SQL SSRS and Dynamic Row Grouping

I have a dynamic SQL query that have dynamic column names. ( The resultset is then pushed into a tablix very similar to this setup(https://www.youtube.com/watch?v=BB9wvvkDY7Y ).It works fine. However, I need to establish a grouping on the row in SSRS. Due to the dynamic nature, the fieldname is not available before run time and therefore I cannot set a group on the row. I have tried several workarounds, using parameters like :
=JOIN(Parameters!DynamicGroup.Value, ", ")
(it is a multivalued field), but I cannot seem to get this working. At best, I get 1 row returned.
I may not be clear on this, but what I need is to be able to use the grouping when exporting to excel to have each group create a new sheet in the workbook.
Any help would be appreciated.
Thanks for the replies. I figured out what why I am only getting back a single row. It is because of the way the dynamic query is pivoting the resultset and then grouping it to display all columns(marked with number) as a row. So all fields with the same number becomes a row. When I add another grouping it is taking this qrouping, hence there will only be one row because it is unique(pivoted).
This leads me to think that I cannot get this done this way. Is there a way that I can have dynamic column names (based on Dates)? There will always be the same number of columns returned, but the content will different. I googled this, but I have not found anything that really solves this issue.

How to fix blank line appending at end of query result

I'm attempting to create clean and professional looking queries for a college project, but for some reason a blank row starting with an asterisk appears at the end regardless of what I do.
So far I've tried a bunch of suggestions found on different forums, including setting the RecordsetType to "snapshot", and importing the file from a cleaned excel sheet, but so far I have had no luck.
The code for most cases is a simple SQL query such as this:
SELECT Table1.[Client Number], Table1.[Client Name], Table1.[Amount Paid], Table1.[Current Due]
FROM Table1;
Is the solution in the properties of my table/query, or is it perhaps within the code itself? I am VERY new to access, so forgive me if the question seems naive.
It should look like this:
but instead it looks like this:
I do want to reiterate that this IS for homework, but the question really has more to do with me wanting the output to look nice. (Which of course my Professor wants as well).
Any help at all would be greatly appreciated!
As far as I am aware, it is not possible to disable the data entry row when viewing the results returned by an MS Access query.
However, if you were to create a Datasheet Form whose Record Source is set to your saved query, then you can remove the blank row by setting the Allow Additions property to No within the properties of the form:

Populating a Column in a Relation Using SQL Update Table and Set Commands in MS Access

I am using MS Access 2016 to learn SQL as part of a class on the fundamentals of databases. I am tasked with adding a new column to a table and then populating that column. The column should reveal whether an account is paid in full or if a balance remains to be paid. Based on that criteria it contains only 'Yes' or 'No.' The formula relies on data from two tables (ENROLLMENT and COURSE).
Here are the tables I created:
I have been researching the problem here and on other sites but not finding the logic and only getting syntax errors.
Here are a couple ways I have tried
I am looking for the direction to go to approach the issue and not asking for someone to do the coding for me. Can anyone point me in the right direction?
The following should help populate the column you want to create:
SELECT ENROLMENT.AmountPaid, IIf([ENROLMENT]![AmountPaid]>0,"Yes","No") AS Paid
FROM ENROLMENT;

SQL how to make a query to calculate percentage average of variables of survey in form

I'm in a dying need for help. I'm absolutely no good in Access but I've taken a survey where I got 100 responses. I converted this from Excel to Acces.
Now, I've created a form where I've set checkboxes for each answers (see image 1)
So what I want to create is when I select some checkboxes of answers, and I'll click "Filteren" it shows next to the answers what the average percentage is of those answers that are checked.
Now, what I'm struggling with is the query, I have absolutely no clue how to start this.
I do have another table called "resultaten" (results) which would show the results of the checked answers, and I know I need to make a query from this table. (image 2)
So I want to create a query per answer that calculates the average but I have absolutely no clue where to start
Could someone please help me?

Resources