Quantcast
Channel: Desktop topics
Viewing all 219159 articles
Browse latest View live

Rank Order Network

$
0
0

Hi all,

I'm trying to find a way to rank order a network.  I have two columns with "start" and "end" destinations of each segment of the network.  In the case of this problem, there will always be a last destination, though their may be multiple paths into the network.  I've included a simple example.


To do this in C++ or Matlab I would use a For Loop and something like an insertion sort algorithm to build the list where the prior row's "end" is equal to current rows "start" then apply the rank order to the sorted list by group.  I know in principle that I would perform this in M by wrapping it in a Group function, but beyond that I'm uncertain how to compare different columns in different row in this way.

In the event of ties (where two nodes feed into one) which is given each rank is not important.

 

Simple Data Example

 

Group

Start

End

1

A

C

1

C

D

1

B

C

1

E

F

1

D

E

2

K

L

2

M

O

2

L

M

2

N

O

2

O

P

 

 

Network.PNGNetwork diagram

 

Desired Results

 

Order Number

Group

Start

End

1

1

A

C

3

1

C

D

2

1

B

C

5

1

E

F

4

1

D

E

1

2

K

L

3

2

M

O

2

2

L

M

4

2

N

O

5

2

O

P



Any ideas?


Stored procedure execution when desktop is opened

$
0
0

Hi

I have a strnage behaviuos of PBI desktop. I have all set up to import queries. one table is populated via stored procedure. The strange thing is i see when i open powerbi desktop on sql server side i see that stored procedure is executed. and it is executed 2 times and 2 instances of this procedure is running that makes sql server practicaly unavailable? 

Pls help to find this issue. 

Color apply horizontally

$
0
0

How do we apply color in horizantal way like Row wise? For example we have a table shown below and it has values from Col1 to 5 and I want to apply the color variations based on the value like if it is max then it should be red and min value should apply green and all middle values should apply orange. How can we achieve that?

Capture.JPG

Very weird problem

$
0
0

In power Bi I have some self made columns where everything seems correct:

Schermafbeelding 2019-11-30 om 11.52.40.png

RunningCharge is a column with a cumulative sum beginning at the start of the year and sums all charges to that date

And Maxpermonth is a column where he takes the maximum value of per month of RunningCharge

 

I made an visualization where every month contains the sum of all charges for that certain month and there is a line in that chart that shows the maximum value per month for the running charge. So you can see the cumulative charge over the year and see which months have the most influence of that cumulative run.

(I can not show the visualization for private reasons, but I can show this:)

Schermafbeelding 2019-11-30 om 12.01.19.png

 

Now the weird part. You see I choose the median of the Maxpermonth for the line. The reason for that is that is the only way it works. When I choose the maximum, minimum or average, if it worked correctly, it should not make any difference, because all the values for one month in the column Maxpermonth are the same. But somehow it gives totally different values.

 

Now the even more weird part of it. When I choose for example maximum, he chooses the maximum for some months that don't even have that maximum in it. For example, in April 2017 there was a maximum of about €70.000. For April 2017, he gives that value, but also for some other months which makes no sense at all, even for months (not only April) in 2018 he gives the same value. When I look at the columns there is really nothing wrong with it.

 

Sorry for not sharing the plots, but I just can't share that information

 

Card showing wrong rowcount. whatif filter ignored

$
0
0

my data source is star schema datamart

i have a simple viz that's filtered by slicers based on dimension attribute values

i also have a whatif param that i'm using to filter the viz to only records where my physical measure is less than or equal to the whatif value

 

i've set it up by doing a calc in my fact table:= measure - whatif value

then i added this as a filter to the viz and set it as less than or equal to 0. I'm not sure if there's a less convoluted way of setting this up?

 

I want to add a card or something that shows a simple # of rows that make up the viz but the number i'm getting is too big. I've verified it by changing my viz to a table; i can see it's 20 rows but the row count card is showing 200+

 

it seems like the card is ignoring the whatif filter and i cant seem to add it to the card as a filter and configure it

 

is this a bug?

is there a workaround?

Power BI table data export in csv to email using Microsoft Flow

$
0
0

Hello Expert,

How Power BI table data export in csv to email using Microsoft Flow as we know it can refersh data sets but how about tables export as email attachment

 

Shree

 

Returning a balance sheet value in a matrix for end of period (Y, Q, M)

$
0
0

PBIX file is here: PBIX File 

 

The tab in question is titled Power BI Forums Help

 

I have monthly data in an unpivoted table and I'm trying to create a measure that pulls in the latest month if my matrix column is drilled to month, latest quarter if drilled to column, and latest year if drilled to year.  

 

The measures work when the matrix is drilled down to month, but are summing across the time periods (all three months in a quarter, all 12 months in a year), when drilled up.

 

If I break the relationship between my Date table and my data table, the Matrix works as intended, but I need to keep the Date/data relationship for other visuals.

 

Here's the structure of the measure:

_BS Single = CALCULATE( SUM('_Monthly Balance Sheet'[Balance]), FILTER('_Monthly Balance Sheet', MONTH('_Monthly Balance Sheet'[Period]) = CALCULATE(MAX('Calendar'[Month Number])) && YEAR('_Monthly Balance Sheet'[Period]) = CALCULATE(MAX('Calendar'[Year])) && LEFT('_Monthly Balance Sheet'[Item Number],5) = VALUES('_Formatting Table'[Group Set]) ) )

 

 

 

Average by category quick measure

$
0
0

Average Parts per Day =
AVERAGEX(
KEEPFILTERS(VALUES('UGUExports'[Occured].[Day])),
CALCULATE(COUNTA('UGUExports'[Part]))
)

 

The above formula is a quick measure I use to calculate the average parts per day submitted to my database. This formula works fine, but when I manually calculate the average parts submitted per day I get a value off by 8 parts per day. 

 

What I think is happening is that the above formula is calculating the average based on the dates listed in the [occured] column. What I need is it to calculate the average based on all days between firstdate[occured] and lastdate[occured]. 

 

Basically, I need the formula to account for days in between submission dates too. 

 

Can someone help with creating a formula to accomplish this? I am new to Power Bi and would really appreciate the guidence.

 

Thanks in advance.


AnalysisServices: The type initializer for 'Microsoft.AnalysisServices.AdomdClient.NamespacesMgr'

$
0
0

Hi!

 

I try get data from Analysis Services by query and i get this error:

AnalysisServices: The type initializer for 'Microsoft.AnalysisServices.AdomdClient.NamespacesMgr' threw an exception.

 

I have already tried to delete the PowerBI folder in Appdata, but it did not work : (

Who has encountered this error?

Help me please

 

Thank you advance!

 

Sub level Chart

$
0
0

Hi,

 

Please help me below scnario to solve?

 

i have table in power bi..

q1.PNG

 

 

 

 

 

 

i need to show graph like below.. SELECT ALL oprion to show like Chart1..if i select filter(EX:P1.4) same chart need to show Chart 2 content..Advance thank you for everyone..

q2.PNG

time duration between time frames

$
0
0

Hi all,
I'm trying to calculate the duration of an event, but expressed as its parts falling between specific time frames.
There are two tables, stops_table and hours_table:
stops_table shows the event start and end time, 

Stop startStop end
14:5215:30
19:5120:10
20:1121:24

,while hours_table shows the time frames, expressed as hour start and hour end.

hour starthour end
14:3015:00
15:0016:00
16:0017:00
17:0018:00
18:0019:00
19:0020:00
20:0021:00
21:0022:00


I need to calculate the duration in minutes, applying pretty much the following logic:

if stop start > hour start and stop end < hour end, then duration = stop end - stop start

if stop start > hour start and stop end > hour end, then duration = hour end - stop start

if stop start < hour start and stop end < hour ned, then duration = stop end - hour start
I am able to get there using DAX and utilizing FIRSTNONBLANK and LASTNONBLANK functions then filtering using the if statements.
The result is table like this:

hour starthour endstop startstop endstop duration
14:3015:0014:5215:008
15:0016:0015:0015:3030
16:0017:00   
17:0018:00   
18:0019:00   
19:0020:0019:5120:009
20:0021:0020:0020:1010
21:0022:0021:0021:2424


The problem is that, the above table is wrong, as there are cases where events with stop ends in a specific time frame and then another event starts in the same time frame, like this case:
In the time frame between 20:00 and 21:00, an event stopped at 20:10 (that started at 19:51), but another one started at 20:11 and lasted until 21:24. so the correct table visualization would be like this one:

hour starthour endstop i startstop i endstop n startstop n endstop duration
14:3015:0014:5215:00  8
15:0016:0015:0015:30  30
16:0017:00     
17:0018:00     
18:0019:00     
19:0020:0019:5120:00  9
20:0021:0020:0020:1020:1121:0010+49=59
21:0022:00  21:0021:2424


Any help appreciated

Filter Values Between Dates

$
0
0

I am really struggling with this filter issue.

 

The table involved (Fees_WIP) contains Work in Progress values for a services company. The table includes the date the value was added to the Work in Progress (i.e., the date of the service) and the date the value was subtracted from Work in Progress (i.e., the date of payment for the service). A relationship exists between [DateInWIP] and the dates table.

 

I am trying to calculate the runing total WIP value for any given date. Conceptually, the total on any given date would be

the SUM of WIP where DateInWIP <= DATE && DateOutWIP > DATE.

 

I have made many attempts at this, but keep running into errors.

 

Thanks.

 

 

 

 

 

 

Refresh failed

$
0
0

Hi

 

I know this might be a silly question, but does anyone know what this means? Should i take this literally and have to keep my laptop on during refresh times?

 

Or could there be an error at source server, where the Fact table comes from. I tried refreshing today to get yesterdays data and its not coming through in Desktop in my tablesm, so it seems to be at source. Is that what this message is saying?

 

"Your data gateway (personal mode) is offline or could not be reached. Ensure the gateway computer is on and you are logged on to it during the scheduled refresh period"

 

Any advice appreciated.

 

Regards

Ben

 

PATH - DAX Measure - A table of multiple values was supplied where a single value was expected

$
0
0

Hi,

 

I am a stuck trying to create a new measure using PATH.

I have the following data, one column has the CostCenterID, the next the CostCenterID of the Parent.

I want to create a new measure that will display the path of the CostCenter like this:

 

Name Parent Path

501 501
501-01501501|501-01
501-01-01501-01501|501-01|501-01-01
501-01-01-01501-01-01501|501-01|501-01-01|501-01-01-01
501-01-01-02501-01-01501|501-01|501-01-01|501-01-01-02
501-01-01-03501-01-01501|501-01|501-01-01|501-01-01-03
501-01-01-04501-01-01501|501-01|501-01-01|501-01-01-04

 

No matter what I do I get the error:

Couldn't load the visual data for this visual

Calculation error in measure. A table of multiple values was supplied where a single value was expected.

 

Thanks for you help

Convert a text measure to a date time measure

$
0
0

Hi all,

 

I have a problem with my calendar table.

I create a max_date measure, and POWER BI undrestand it is a datetime value.

Same when I create a same_max_date_last_week = max_date - 7, and POWER BI undrestand it is a datetime value, too.

But when I create a same_max_date_last_month = DATEVALUE( EDATE( [max_date], -1 ) ) & " " & TIME ( 23,59,59), the POWER BI cannot undrestand it is a datetime value, only know the measure is a text value.

 

Please take a look at my screenshoot, and the file on the link below and give me some help.

(Sorry if I'm not good at English).

Many thank!

https://drive.google.com/open?id=1vKfr26yg0lTgJk1WMTY6QL-pT0iwocLR

2019-11-29_17-44-59.png

 


Help with % Mix which then becomes recursive

$
0
0

Hi there, happy holidays everyone.  

Here is the challenge I am facing.  I have a product mix that i am using for a certain month, for example january, then i want to apply a new number for January but apply the product mix percentages that were previously calculated.  I am using measures to calculate the % of total (as in the sample below) but when I apply it to the new value that i would like to spread powerbi calls out a recursive error because i want to replace the original January values with the new values.

 

Is there a way around this?  i tried to create a disconnected table with the percentages housed in them but that didn't work.  I am sure there must be an easy way to solve this.  Thanks for your help!

 

Recursive.PNG

Rank with three conditions

$
0
0

Hi All, 

 

I have spent hours on this and yet to find a result that works, I need to be able to dynamically rank based on three conditions:

Conditon 1 = Level

Condition 2 = Semester / Term

Condition 3 = Number of responses (greater than or equal to value on disconnected slicer)

 

The data looks like this:

 

RecordLevelSemester / TermResponsesResult
Record 1UGTerm 146.00
Record 2UGTerm 116.00
Record 3UGTerm 186.00
Record 4UGTerm 1185.75
Record 5UGTerm 1265.75
Record 6UGTerm 1155.60
Record 7PGTerm 1825.56
Record 8PGTerm 145.50
Record 9PGTerm 1245.43
Record 10PGTerm 2495.28
Record 11PGTerm 2515.20
Record 12PGTerm 2775.17
Record 13PGTerm 22345.16
Record 14UGTerm 21765.15
Record 15PGTerm 2195.15
Record 16UGTerm 2655.11
Record 17PGTerm 21675.09
Record 18PGTerm 22785.08
Record 19UGTerm 23785.08
Record 20PGTerm 24955.01

 

Disconnected Responses Slicer:
10
20
50
100

 

my last test looks like this, but I get the error that there were too many arguments for the RANX function. 

I have tried summarize but havent managed to get it working. 

Would really, really appreciate help with this

 

_Test 5 = 

VAR Selected = SELECTEDVALUE(Ranking_Summary_Table_Course[Level])

VAR Term = SELECTEDVALUE(Ranking_Summary_Table_Course[Semester / Term])

RETURN

RANKX (

FILTER (ALL(Ranking_Summary_Table_Course),

'Ranking_Summary_Table_Course'[Responses]>= [Selected_Responses] &&

'Ranking_Summary_Table_Course'[Level] = Selected),

FILTER(Ranking_Summary_Table_Course,

Ranking_Summary_Table_Course[Semester / Term] = Term),


CALCULATE (

[Sum_Result],

ALLEXCEPT('Ranking_Summary_Table_Course','Ranking_Summary_Table_Course'[Record])

),

,

DESC,

DENSE

)

Append Queries do now show in the Query Pane.

$
0
0

Hello all. I am a bit new to BI but I love it.

I am following a great book from Packts. At some point we are creating an Append query with three other queries (January, February and March). The queries are perfectly correct to be appended. Only the Month differs.

In the Append dialog box, in the Table to append list I have:

January (Current)

February

March

 

Once completed the book says that the result should be a new query called Append1. There are other steps I am suppose do with the query. It adds: This new query should consist of a single step, Source. The Formula Bar should display:

= Table.Combine ({January, February, March})

Problem is that the query Append1 never appears. There is nothing new in the Queries Pane. Tried it 3 times. So I am having trouble continuing the tutorial. I thought of entering the M code above in a New Query and it works but the name was different. Still that allowed me to continue with the book.

I looked at YouTube videos on Append Queries in Power BI that did show Append1 but other video did not.

Please someone enlighten me regarding this. If I didn't have that M code I would not be able to finish the Tut.

I am currently using: Version: 2.75.5649.861 64-bit (November 2019)

I am appreciative of the time one can take to comment on my question.

 

Daniel Lamarche

Below is my Queries pane after the Append query is created. There is no Append1 query.

Append Query.jpgMy Queries Pane after the Append Query is created.

calculate percentage growth

$
0
0

Hi, I want to calculate percentage growth for each row and also for the total. I added a calculated column but then its showing infinity in many rows and even in the total. I manually calculated the % growth in the total and it's -9%. Please help.

image.png

 

getting totals according to specified group/criteria

$
0
0

hi,

i'm doing a financial report that uses charts of accounts (with numerous account codes / account names) such as 

account code    account names             account type
10000-10999     cash                             assets

11000-11999     account receivables     assets

...

20000-20999     account payable           liabilities

21000-21999     other creditors              liabilities

...

30000-30999     rent income                   income

31000-31999     book sales                     income

....

40000-40999     utility expense                expense

41000-41999     salary expense                expense

 

note:
there are more subcodes for different account names under each account code range.

 

kindly advise on how to sum up the value/amount for each account code that will be put under each account code range.

 

subsequenly, we need to also sum up according to assets, liabilities, expenses, & revenue.

 

for info, i'm doing this for 50+ organizations that are clustered according to geographical zones (e.g. north, south, east, west) that will eventually also be summed up at the geographical zones and finally as 1 consolidated financial report.

 

tks, -nik

Viewing all 219159 articles
Browse latest View live